Session never expired

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
markthien
Forum Commoner
Posts: 33
Joined: Fri Feb 13, 2009 7:50 pm

Session never expired

Post 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
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Session never expired

Post 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.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
markthien
Forum Commoner
Posts: 33
Joined: Fri Feb 13, 2009 7:50 pm

Re: Session never expired

Post by markthien »

i found solution here. thanks anyway bro !

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