Jump to content

Inconsistent $_SESSION variables


peterw

Recommended Posts

The variable is set so the user can see the inside pages of a members area after they have logged in. By the time they go to a different page the variable is gone.

 

Please note the following:

 

- It doesn't happen to a specific browser

- It doesn't happen all of the time

- It works when I print the value of the $_SESSION variable

- Once it has been printed to the screen once if I remove the functionality that makes it print, it keeps working.

 

It's nearly impossible for me to test because I can't recreate the problem. It is my client that has the problem every once in a while.

 

Please help!!

Link to comment
Share on other sites

Are you on a shared web host and are using the default session.save_path setting (/tmp) that would cause your session data files to be stored in the common location as all the other session data files?

We have a dedicated server but in the context of this client it is a shared web host as all of our clients are sharing our dedicated server.

It's  a cpanel WHM server and I have verified that I am using the default session.save_path of /tmp.

 

Do you have any suggestions on how to change this so eah client has their session files stored in a unique folder(I'm thinking a custom php.ini file for this client)

 

Thanks for your time

Link to comment
Share on other sites

One of the accounts is probably using a short session.gc_maxlifetime in a misguided attempt to 'automatically' log out visitors.

 

Each account should set their session.save_path to point to a 'private' folder within their own account's folder tree so that only their session settings, and not the settings of the other accounts, will affect their session data files.

Link to comment
Share on other sites

One of the accounts is probably using a short session.gc_maxlifetime in a misguided attempt to 'automatically' log out visitors.

 

Each account should set their session.save_path to point to a 'private' folder within their own account's folder tree so that only their session settings, and not the settings of the other accounts, will affect their session data files.

How would I set it up for their sessions to store in their own private folder?

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.