Session ID question

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
dime_f
Forum Newbie
Posts: 1
Joined: Sun Jun 26, 2011 5:04 pm

Session ID question

Post 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
Doug G
Forum Contributor
Posts: 282
Joined: Sun Sep 09, 2007 6:27 pm

Re: Session ID question

Post 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?
User avatar
flying_circus
Forum Regular
Posts: 732
Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR

Re: Session ID question

Post 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).
Post Reply