note 84045 added to session.configuration
| From: | 00 at f00n dot com | Date: | Wed, 25 Jun 2008 13:36:22 +0000 |
| Subject: | note 84045 added to session.configuration | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-140797@lists.php.net to get a copy of this message | ||
After having many problems with garbage collection not clearing my sessions I have resolved it
through the following.
First I found this in the php.ini (not something i noticed as i use phpinfo(); to see my hosting
ini).
; NOTE: If you are using the subdirectory option for storing session files
; (see session.save_path above), then garbage collection does *not*
; happen automatically. You will need to do your own garbage
; collection through a shell script, cron entry, or some other method. ; For example, the
following script would is the equivalent of
; setting session.gc_maxlifetime to 1440 (1440 seconds = 24 minutes):
; cd /path/to/sessions; find -cmin +24 | xargs rm
With this is mind there are options.
1. dont use a custom save_path.
** This means if your isp hasnt defaulted your session temp to something safer than install default
or you are using a shared directory for session data then you would be wise to use named sessions to
keep your session from being viewable in other people's scripts. Creating a unique_id name for
this is the common method. **
2. use your custom folder but write a garbage collection script.
3. use a custom handler and a database
----
Server IP: 87.124.64.96
Probable Submitter: 62.3.232.153
----
Manual Page -- http://www.php.net/manual/en/session.configuration.php
Edit -- https://master.php.net/note/edit/84045
Del: integrated -- https://master.php.net/note/delete/84045/integrated
Del: useless -- https://master.php.net/note/delete/84045/useless
Del: bad code -- https://master.php.net/note/delete/84045/bad+code
Del: spam -- https://master.php.net/note/delete/84045/spam
Del: non-english -- https://master.php.net/note/delete/84045/non-english
Del: in docs -- https://master.php.net/note/delete/84045/in+docs
Del: other reasons-- https://master.php.net/note/delete/84045
Reject -- https://master.php.net/note/reject/84045
Search -- https://master.php.net/manage/user-notes.php