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
https://forums.phpfreaks.com/topic/37736-session-variable-questions/
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();

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.