Session problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've 2 requirements
- session will end when browser is closed
- session will end after 90 minutes inactivity.

Now, from the documentation session.cookie-lifetime when set to 0 _should_
cause the session to end when the browser is closed, although at the moment
this doesn't appear to be the case for me. So, question one, can something
override this in someway? Some other setting perhaps?

Now, to get the 90 minute inactivity timeout I would need to set
session.cookie-lifetime to 5400 (seconds). This means the session ending on
broswer close won't work though, as it's the same setting I was to set to 0.

Can I have my cake AND eat it so to speak? Or is this a limitation of


Re: Session problem

David Gillen wrote:
Quoted text here. Click to load it

You can't guarantee the session will be closed when the browser closes -
all you can do is recommend it.  Since it's on the user's computer, the
user can change the value and/or have the browser ignore it all together.

I'd recommend you just leave it at 90 minutes - or keep it short, i.e.
15 minutes, to ensure they are still active.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: Session problem

.oO(David Gillen)

Quoted text here. Click to load it

The entire browser (all windows!) has to be closed for the session
cookies to be deleted, not just the current tab.

Quoted text here. Click to load it

With a lifetime other than 0 it's not a session cookie anymore. Leave it
as it is. For controlling the session's timeout value, check out
session.gc_maxlifetime and see the manual for details.


Re: Session problem

Quoted text here. Click to load it

I have used session.timeout = 90 or some other value to trigger the
session to timeout. I dont remember if the value is in minutes or secs

Site Timeline