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
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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.