note 69763 added to function.session-set-save-handler

From: Date: Wed, 20 Sep 2006 00:02:43 +0000
Subject: note 69763 added to function.session-set-save-handler
Groups: php.notes 
Request: Send a blank email to php-notes+get-117335@lists.php.net to get a copy of this message
Note that for security reasons the Debian and Ubuntu distributions of php do not call _gc to remove old sessions, but instead run /etc/cron.d/php*, which check the value of session.gc_maxlifetime in php.ini and delete the session files in /var/lib/php*. This is all fine, but it means if you write your own session handlers you'll need to explicitly call your _gc function yourself. A good place to do this is in your _close function, like this: <?php function _close() { _gc(get_cfg_var("session.gc_maxlifetime")); // rest of function goes here } ?> ---- Server IP: 216.235.15.211 Probable Submitter: 216.58.8.243 ---- Manual Page -- http://www.php.net/manual/en/function.session-set-save-handler.php Edit -- https://master.php.net/note/edit/69763 Del: integrated -- https://master.php.net/note/delete/69763/integrated Del: useless -- https://master.php.net/note/delete/69763/useless Del: bad code -- https://master.php.net/note/delete/69763/bad+code Del: spam -- https://master.php.net/note/delete/69763/spam Del: non-english -- https://master.php.net/note/delete/69763/non-english Del: in docs -- https://master.php.net/note/delete/69763/in+docs Del: other reasons-- https://master.php.net/note/delete/69763 Reject -- https://master.php.net/note/reject/69763 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117335) next »