note 38367 deleted from ref.session by nlopess

From: Date: Fri, 12 Mar 2004 14:43:29 +0000
Subject: note 38367 deleted from ref.session by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-66730@lists.php.net to get a copy of this message
Note Submitter: christophe@NOSPAM.publicityweb.com ---- 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

« previous php.notes (#66730) next »