hi
i am experiencing the problem of sessions dying randomly in one of my apps. i will be clicking around and then i'll arrive at a page that tells me that i'm not logged in anymore...
i don't know where to start to troubleshoot the problem, as this app is really large (many php files to sift through for miscodings...)
although they were all written pretty much the same way.
when a user logs in a session is created with
<snip>
session_start();
$valid_user = $_POST['username'];
session_register("valid_user");
<snip>
every page of my app has a session-checking function at the top of the page that basically checks if the user is logged in correctly and if the current session is registered
<snip>
global $valid_user;
if (session_is_registered("valid_user"))...
<snip>
i have a logout page that destroys the current session
<snip>
session_destroy();
<snip>
as well as a javascript timer on the header of every page that redirects the user to the logout page if they are inactive for 20 minutes. most of the times, everything works ok, it's just that every so often i'll be clicking around and i'll find my current session has died for no reason
the value for session.cookie_lifetime is 0 in my php.ini (i had it set at 1200 but i set it back to 0 a few weeks ago in hopes that this would fix this problem, to no avail)
has anyone dealt with this type of issue before? i think that i've got all the bases covered. just thought i'd throw this out, since i may be missing something obvious... if not, i wanted to get your opinions on how i should go about fixing this problem. any suggestions would be appreciated
thanks