Posted by Sam on 02/23/06 13:00
Sessions which do not expire...
The site I'm developing requires users to log in before they can access
cetain pages.
Logging in and out is no problem and the required pages are protected
until the user logs in. However, the problem is that the sessions do
not seem to expire.
The session can stay active for over 24hrs as long as IE is left open.
I want the session to expire after around 30 mins of inactivity. I put
ini_set("session.gc_maxlifetime", 1440)
above the session_start() line in my main class file but this doesn't
help.
I ran phpinfo() and saw:
Directive Local Value Master Value
session.gc_maxlifetime 1440 1440
What else do I need to do to force the session to end after this time?
NOTE: I have session_start() statements at the beginning of most of the
protected pages as I believed I needed these in order to pass session
variables between pages.
Could this be part of the problem?
Thanks,
Sam.
Navigation:
[Reply to this message]
|