This topic is locked

Inactivity Logout

11/20/2010 10:10:38 PM
PHPRunner General questions
B
brhipple author

I have browsed this forum on how to implement a inactivity logout (session timeout) and I tried the following but I never get a timeout to occur:
In the after login event:

ini_set("session.gc_maxlifetime","30");
In the php.ini:

session.save_path = "\XAMPP\tmp"

; After this number of seconds, stored data will be seen as 'garbage' and

; cleaned up by the garbage collection process.

; http://php.net/session.gc-maxlifetime

session.gc_maxlifetime = 30
I am using XAMMP.
Do you all know what I am doing wrong?
Thanks in advance.

Sergey Kornilov admin 11/24/2010

To be honest - I don't know what to recommend here. PHP sessions should expire automatically and you doing it the right way.
There is a good article on this subject that explains that PHP session parameters are unreliable and what else you can do:

http://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes