note 99680 deleted from function.session-set-save-handler by thiago

From: Date: Mon, 30 Aug 2010 19:32:37 +0000
Subject: note 99680 deleted from function.session-set-save-handler by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-172170@lists.php.net to get a copy of this message
Note Submitter: Ihsan ---- to newton at tricko dot com dot br Php session system has many troubles. Ok. But your solution lacks garbage collection. Garbage collection is required 1) If a client leaves the session without logging off. I.e. simply closing the browser. 2) If a client times out... Does not initiate any communication with the server longer than the expiry time. Garbage collection avoids inflation of session table and it is an additional security measure too. To initiate garbage collection you may: 1) Add a probabilistic trigger. Like comparing a random number in the range of 0...999 with 543 and when they are equal, doing it. 2) Write a jobs manager, scheduling garbage collection to specific time intervals etc...

« previous php.notes (#172170) next »