session annoyance
I was wondering if anyone had come across a similar problem, or could help.
Im opening a session for a user on login to a site (using cookies). When they log in a cookie is set, everything looks fine, the timeout of the cookie is set way into the future to keep the session open for a while. Everything seems to run ok, killing the browser and opening maintains the session.
When I leave the browser window open, inactive, for say 2 hours and come back, the session has timed out, its baffaling. Using mozilla I can open the cookie manager and see that the cookie is still there, its still all looks valid, identical to when it was first set, it just refuses to open the session and I have no idea, no error messages and no trace of what could be going wrong.
The code is quite simple (as most of the session stuff is set in the ini file) but looks like :
Starting :
session_name ("cookiename");
session_start ();
Maintaining
if (isset ($_COOKIE['cookiename'])) {
session_name ("cookiename");
session_start ();
}
At first I thought it might have something todo with p3p, having not implemented a specification, but alas it isnt, any help ?
Im opening a session for a user on login to a site (using cookies). When they log in a cookie is set, everything looks fine, the timeout of the cookie is set way into the future to keep the session open for a while. Everything seems to run ok, killing the browser and opening maintains the session.
When I leave the browser window open, inactive, for say 2 hours and come back, the session has timed out, its baffaling. Using mozilla I can open the cookie manager and see that the cookie is still there, its still all looks valid, identical to when it was first set, it just refuses to open the session and I have no idea, no error messages and no trace of what could be going wrong.
The code is quite simple (as most of the session stuff is set in the ini file) but looks like :
Starting :
session_name ("cookiename");
session_start ();
Maintaining
if (isset ($_COOKIE['cookiename'])) {
session_name ("cookiename");
session_start ();
}
At first I thought it might have something todo with p3p, having not implemented a specification, but alas it isnt, any help ?
