note 115842 added to session.configuration

From: Date: Thu, 02 Oct 2014 13:22:25 +0000
Subject: note 115842 added to session.configuration
Groups: php.notes 
Request: Send a blank email to php-notes+get-200566@lists.php.net to get a copy of this message
On debian (based) systems, changing session.gc_maxlifetime at runtime has no real effect. Debian disables PHP's own garbage collector by setting session.gc_probability=0. Instead it has a cronjob running every 30 minutes (see /etc/cron.d/php5) that cleans up old sessions. This cronjob basically looks into your php.ini and uses the value of session.gc_maxlifetime there to decide which sessions to clean (see /usr/lib/php5/maxlifetime). You can adjust the global value in your php.ini (usually /etc/php5/apache2/php.ini). Or you can change the session.save_path so debian's cronjob will not clean up your sessions anymore. Then you need to either do your own garbage collection with your own cronjob or enable PHP's garbage collection (php then needs sufficient privileges on the save_path). Why does Debian not use PHP's garbarage collection? For security reasons, they store session data in a place (/var/lib/php5) with very stringent permissions. With the sticky bit set, only root is allowed to rename or delete files there, so PHP itself cannot clean up old session data. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=267720 . ---- Server IP: 72.52.91.14 Probable Submitter: 131.246.19.215 ---- Manual Page -- http://php.net/manual/en/session.configuration.php Edit -- https://master.php.net/note/edit/115842 Del: integrated -- https://master.php.net/note/delete/115842/integrated Del: useless -- https://master.php.net/note/delete/115842/useless Del: bad code -- https://master.php.net/note/delete/115842/bad+code Del: spam -- https://master.php.net/note/delete/115842/spam Del: non-english -- https://master.php.net/note/delete/115842/non-english Del: in docs -- https://master.php.net/note/delete/115842/in+docs Del: other reasons-- https://master.php.net/note/delete/115842 Reject -- https://master.php.net/note/reject/115842 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#200566) next »