Page 1 of 1

Session ID question

Posted: Sun Jun 26, 2011 5:10 pm
by dime_f
Hi All,

Can anybody tell me why my session id is always different when i will close the browser.

I'm developing a site, actually functionality to count all unique opened sessions within 24h. As i mentioned my problem is when i close my browser, open again and goto site my session id is automatically regenerated with new (i'm expecting the old one).

Can anybody help me?

thanks

Re: Session ID question

Posted: Sun Jun 26, 2011 8:03 pm
by Doug G
my session id is automatically regenerated with new (i'm expecting the old one).
It would be bad if you open a browser and got a previously used session ID. Why would you expect the previous session ID to be reused?

Re: Session ID question

Posted: Sun Jun 26, 2011 8:33 pm
by flying_circus
Look into the session.cookie_lifetime parameter. By default it is set to '0' which indicates the cookie should be terminated upon closing of the browser window. You can change it to '86400' for a 24h lifetime (60sec * 60min * 24hr).