note 57098 added to function.session-cache-expire
| From: | (AT) | Date: | Fri, 23 Sep 2005 14:21:27 +0000 |
| Subject: | note 57098 added to function.session-cache-expire | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-95661@lists.php.net to get a copy of this message | ||
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
----
Manual Page -- http://www.php.net/manual/en/function.session-cache-expire.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+57098
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57098&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+57098&report=yes
Search -- http://master.php.net/manage/user-notes.php