View Full Version : Session Question

04-03-2003, 12:50 PM
I'm using sessions on an Intranet with MySql based authentication.

A user will quite happily not encounter an error with the session if they use the internal links. (if there is an error, a please log-in again page appears).

If, however, they click a link that opens in a new window, close the new window then try to continue browsing the intranet, the session is gone and they get the login message. This also happens if they click a link to try to download a file.

What can I do/change to prevent this happening?
I've read a thread about using cookies instead of sessions, but at the moment I know even less about cookies then I do about sessions.

04-03-2003, 02:41 PM
If a user closes ALL browser windows then the session will be lost (by default) .. you can use


which will extend the life of the session beyond the closing of the browser window , though garbage collection limits the true 'useful' life of the session cookie.

If you are saying that the user is not closing all windows but still losing the session then its real hard to guess what the exact problem is, I assume that all pages that require sessions use session_start() in the script ?