Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't seem to get Sessions to Expire
02-15-2014, 07:28 AM,
#1
Can't seem to get Sessions to Expire
I have setup my config.php file with the following values:
$SessionSavePath='sessions/';
$SessionLifeTime = 20;

If I login to the application I see a new session created in the sessions/ directory. If I wait 20 seconds or more (hours) I expect the next time I move in the application to be timed out but I am not timed out. My session file gets a new date/time stamp. If I remove the session file and try to move I am redirected to the login page as expected.

How can I get the $SessionLifeTime param to work?

Thanks,
Andrew
Reply
02-15-2014, 07:55 AM,
#2
RE: Can't seem to get Sessions to Expire
If you are running Debian, or a Debian based Linux distro, and you change the default sessions path in config.php then I think you also need to set session.gc_probability to 1. Haven't got time to check it out right now, but I seem to remember this from years back that Debian does some trick on PHP sessions.

Tim
Reply
02-15-2014, 08:12 AM,
#3
RE: Can't seem to get Sessions to Expire
Using Centos, have changed default session path.. Will try setting Garbage Collect Probability to 1
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)