note 57098 deleted from function.session-cache-expire by googleguy
| From: | googleguy@php.net | Date: | Fri, 14 Sep 2012 05:32:37 +0000 |
| Subject: | note 57098 deleted from function.session-cache-expire by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-190756@lists.php.net to get a copy of this message | ||
Note Submitter: djmaze (AT) dragonflycms
----
After recieving a "bogus" mark on a bug report i've tried to find out the differences
between cache_expire and what was causing a session delete after 24 minutes.
cache_expire is used for cached session pages and has nothing to do with the session data
The garbage collector controls the session data and destroys sessions which are older then 1440
seconds (24 minutes) by default.
So to keep a session alive longer then 24 minutes (for example when a visitor tries to POST a huge
message that took him 1 hour to type), you must modify the session.gc_maxlifetime thru ini_set()
Somehow i couldn't find anything in the PHP documentation regarding this and due to that me
(and i think many others) got the wrong ideas regarding PHP sessions.
A few examples to fix session timeout are already posted below but in my opinion they all missed
session.gc_maxlifetime