Page 1 of 1

Session never expired

Posted: Wed Jul 06, 2011 8:55 am
by markthien
Hi guys,

I am using WAMP server version 2.0 with php 5.3.0. I set session.gc_maxlifetime = 60 seconds and I login to my site at http://localhost/ifnoresponse then I let it idle for more than 60 seconds and I browser some page which is required to login. My login php script is very simple, once user successfully login, I just set some session variable like below:

$_SESSION[IFNORESPONSE_USER_ID_SESS_VARIABLE] = $user_id;
$_SESSION[IFNORESPONSE_USER_FULL_NAME_SESS_VARIABLE] = $name;

Appreciate any advice please. Thanks in advance!

regards,
Mark Thien :D

Re: Session never expired

Posted: Wed Jul 06, 2011 10:01 am
by social_experiment
From the title of your post i gather that you could still access the page even after the given 60 seconds? What does the code for your auth page look like, it's possible that even though the session is destroyed, there are still some conditions that allows the user to remained logged-in.

Re: Session never expired

Posted: Wed Jul 06, 2011 11:00 am
by markthien
i found solution here. thanks anyway bro !

http://stackoverflow.com/questions/5202 ... 30-minutes