Jump to content

Session Variable Questions?


neo777ph

Recommended Posts

Does Session Variable Expire?

If Yes..

How Can I configure it that the Session stays for about 8 hours continously..Or it stays forever unless the user log's-out of my PHP built system?

 

I pass a username to a session variable and then this is inserted to the database.

70% percent of the username were inserted to the DB.. 30%, It shows that the username were not inserted to the DB.

I talked to the user,, He said to me he often left his PC log-in to my PHP built system for the whole day's work.

With that i am assuming the session variable had expired. I want to prelong it's life..How Can I do It?

 

Help

 

Link to comment
Share on other sites

the config setting of interest is session.cookie_lifetime which you can set using ini_set('session.cookie_liftime' , X); where X is the number of seconds you want the session to last (0 = as long as browser is open and is default setting) or session_set_cookie_params as described here: http://uk.php.net/manual/en/function.session-set-cookie-params.php.

 

to check the setting use session_get_cookie_params();

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.