Jump to content

Recommended Posts

I just installed a site on a client's server.  I'm using a session based login, and have the session_start() at the top of the pages I need.  However, when I first log in, the session variables I register are all there, but when I click on any page, they are gone.  Does anyone have a clue as to what might be set that's cuasing this?  Thanks.

Link to comment
https://forums.phpfreaks.com/topic/75499-sessions-expiring-from-page-to-page/
Share on other sites

Do not have it as just a number, for some reason it will clear out the session variable on another page, make sure there is a alpha in there.  Try it and see.

 

Session path (for my webserver) has to include the entire path to my area on my webhost.  Sometimes this goes a few folders before HTDOCS (again, this depends on your webhost).

 

Try it with a String first (like "test") and see if that works before you get into the php.ini file.

 

If the String works, you know it has to do with the number.

Well, here's what I do.  I do a print_r() with the session array.  After logging in, all the values I set are there.  Then when I click another button, the array prints up empty.  All array keys are strings, I don't use numbers, like you said, you can't.  As for the path, it's /tmp.  That should be okay.  I tell ya', this is a brain twiser.  I might have to contact the server directly

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.