meddiecap Posted January 20, 2010 Share Posted January 20, 2010 Hi, I've been working on a script which uses 3 session variables to search through 3 levels of folders. eg. $patient = $_SESSION['patient'], $dossier = $_SESSION['dossier'], $background = $_SESSION['background'] folder structure: assets/$patient/$dossier/$background The problem arose when I changed the session.save_path from "/tmp" to "sessions" in order to avoid getting logged out after 30mins. (Different story: php.ini had set it to 20hours, setting was ignored). Setting it to "sessions" solved the logout story, but gave me a different problem in return. The script that looks through the folders doesn't go to the deepest level anymore, (assets/$patient/$dossier/$background) where it should show me the files in the $background-folder. Instead, it shows me all the files AND folders in "assets/". In short: session.save_path = "/tmp": only the files in $background-folder session.save_path = "sessions": all the files and folders in the assets-folder register_globals are off and i have the right permissions on the sessions folder. I've tested if the session were made, and they were, in both session.save_path settings. All the code is exactly the same, only the session.save_path is different. I hope someone has some insight into this. Quote Link to comment https://forums.phpfreaks.com/topic/189239-changing-sessionsave_path-issue/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 21, 2010 Share Posted January 21, 2010 What method did you use to set the session.save_path? A .htaccess file? A local php.ini? In your script before every session start statement? Are you developing and debugging your code on a system with error_reporting set to E_ALL and display_errors set to ON so that you would see all php detected errors? Quote Link to comment https://forums.phpfreaks.com/topic/189239-changing-sessionsave_path-issue/#findComment-999058 Share on other sites More sharing options...
meddiecap Posted January 21, 2010 Author Share Posted January 21, 2010 I've set it in php.ini info() shows the correct info. I've set error_reporting = E_ALL & ~E_NOTICE display_errors = On But no errors show. Quote Link to comment https://forums.phpfreaks.com/topic/189239-changing-sessionsave_path-issue/#findComment-999063 Share on other sites More sharing options...
meddiecap Posted January 21, 2010 Author Share Posted January 21, 2010 Ok, I solved it bij replacing session.save_path = "sessions" by session.save_path = "/full/path/to/sessions" Still, I think it's odd that the relative url only made sessions work partially. Quote Link to comment https://forums.phpfreaks.com/topic/189239-changing-sessionsave_path-issue/#findComment-999624 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.