neo777ph Posted February 9, 2007 Share Posted February 9, 2007 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 Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted February 9, 2007 Share Posted February 9, 2007 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(); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.