note 90739 added to ref.session
| From: | edA-qa at disemia dot com | Date: | Thu, 07 May 2009 12:14:11 +0000 |
| Subject: | note 90739 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-154303@lists.php.net to get a copy of this message | ||
Sessions may be deleted before the time limit you set in gc_maxlifetime.
If you have multiple pages on the same server, each using the session (the same or distinct named
sessions, it doesn't matter), the *minimum* gc_maxlifetime of any of those scripts ends up
being the effective lifetime of the session files.
This can also apply to the lifetime coming from a CLI invocation of a PHP script on that machine
which happens to use the session.
This can be bothersome since even though you think all your pages include the same file which sets
up the script, even a single PHP page which doesn't can invoke the GC and have the scripts
deleted.
Thus, if you need to set a long gc_maxlifetime you are best doing this through the INI file or in a
.htaccess file for the entire directory.
----
Server IP: 212.124.37.9
Probable Submitter: 195.140.184.10
----
Manual Page -- http://www.php.net/manual/en/ref.session.php
Edit -- https://master.php.net/note/edit/90739
Del: integrated -- https://master.php.net/note/delete/90739/integrated
Del: useless -- https://master.php.net/note/delete/90739/useless
Del: bad code -- https://master.php.net/note/delete/90739/bad+code
Del: spam -- https://master.php.net/note/delete/90739/spam
Del: non-english -- https://master.php.net/note/delete/90739/non-english
Del: in docs -- https://master.php.net/note/delete/90739/in+docs
Del: other reasons-- https://master.php.net/note/delete/90739
Reject -- https://master.php.net/note/reject/90739
Search -- https://master.php.net/manage/user-notes.php