Justin French wrote:
True ... but the browser does.PHP cannot possibly know when a user closes a window... PHP regularly "cleans out the garbage" of old abandoned sessions, but you cannot expect this instantly...
I think I would not have this problem using cookies since the cookie would expire after the browser is closed. The reason I am seeing this problem is that I am passing the SID in the URL and hence PHP does not know that the browser was closed.
True. I guess I should set the gc to clean up sessions more often than it does now. Maybe 30 minutes ...If you access that URL tomorrow, I doubt the session will STILL be valid...
I know what they mean. I got very confused until you pointed a very obvious thing out. It's passing the SID in the URL that is causing the problem and as you pointed out there is no work-around.You should do some reading up in the manual & php.ini, making sure what session destroy means, what session.auto_start means, etc.
I'll just have to live with the fact that by passing the SID in the URL the session will be alive until the session gc cleans up.
Thanks,
Jc
PS If I got any of this wrong please let me know.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php