note 38367 added to ref.session

From: Date: Thu, 18 Dec 2003 12:19:33 +0000
Subject: note 38367 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-62169@lists.php.net to get a copy of this message
About deleting sessions files on serveur (ex /tmp/sess_xxx), if they arent garbage collected as you expect (after "expiration date"). This is controlled by the ini settings session.gc_maxlifetime (ex 1440) and session.gc_probability (ex 1). The files are deleted by garbage collection (gc) after gc_maxlifetime seconds (1440sec=24min) and with a probability of gc_probability% each time session_start() is called. Be carefull, the gc_probability unit (not specified in the doc as I wrote this note) is PERCENT, not a probability (a real number between 0 and 1 inclusive, by definition). So 1 doesnt mean a probability of 1 (ie 100%, always occurring), as mathematicians here would expect, but a probability of 0.01 (1%). This mean by default, session tmpfiles are delete 1% of the time, which explain why you can have (very) old (expired) session and their file not deleted (yet). Hope this helps ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+38367 Delete -- http://master.php.net/manage/user-notes.php?action=delete+38367&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+38367&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#62169) next »