Jump to content

Changing session.save_path issue


Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/189239-changing-sessionsave_path-issue/
Share on other sites

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.