Click to See Complete Forum and Search --> : How long do sessions last


damon2003
11-11-2003, 06:24 PM
Hi,
whats the default time before a php session destroys itself.
If the user closers the browser window and returns to the same page in a new window, is the session still there?

Also, how can I make a session last forever until the user shuts down the browser window

Jona
11-11-2003, 06:32 PM
A session variable stays unless you destroy the current session or the user closes the current browser window.

[J]ona

tomhartland
01-09-2004, 03:11 AM
Originally posted by Jona
A session variable stays unless you destroy the current session or the user closes the current browser window.

Carrying on with the line of enquiry...
I'm having a problem with pop-up windows destroying my session.
Do you know of any way in which I can create a pop-up window (which will live within the same session as its parent as standard) but does not close down the session when it is closed?

Cheers,
Tom :-)

Jona
01-09-2004, 01:46 PM
Hello Tom,

Actually I've never had that problem. You say the newly opened window carries the session, but when it is closed, it also ends the session in the parent window? That would make sense--I'd suggest setting a timed-session along with your other session variables and do your validation for session existance that way.

[J]ona