...

View Full Version : Session expiring prematurely



Fumigator
11-08-2006, 01:05 AM
I was under the impression a session cookie expires when the browser closes and not a moment sooner. However my application's session cookie seems to pick fairly random times to decide to expire and disappear, requiring my users to login again. I haven't been able to narrow down the cause, whether it be a certain period of inactivity by the user, or a time of day, or what. It happens with IE6 and Firefox 1.5

Any suggestions to force the session cookie to not expire?

firepages
11-08-2006, 01:41 AM
session.cookie_lifetime in the php.ini defaults to '0' (until browser closes) but your host may have a different setting , you can alter the session cookie lifetime via .. session_set_cookie_params() (http://www.php.net/manual/en/function.session-set-cookie-params.php)

CFMaBiSmAd
11-08-2006, 02:33 AM
See this thread for why your sessions are probably being deleted on the server side (garbage collection running) - http://www.codingforums.com/showthread.php?t=99224

Fumigator
11-08-2006, 03:00 AM
Good info, thanks! I'll see if I can improve things.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum