note 58850 added to function.session-destroy

From: Date: Thu, 17 Nov 2005 19:42:48 +0000
Subject: note 58850 added to function.session-destroy
Groups: php.notes 
Request: Send a blank email to php-notes+get-98720@lists.php.net to get a copy of this message
Running 4.4 under Apache 1.3 under W2K, I'm storing session data in a mysql table. In trying to completely purge a session for security's sake, using this model as shown above: ?php session_start(); // restore the session $_SESSION = array(); // clear the universal var if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time()-42000, '/'); } // clobber the cookie session_destroy(); // purge the session record exit(); // we're done ?> I find that the final step of purging the session record doesn't work as that example seems to imply. Something is re-creating "for free" a data-less zombie record under the same session id immediately after the purge...which, needless to say, is unexpected and disconcerting. ---- Manual Page -- http://www.php.net/manual/en/function.session-destroy.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+58850 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+58850&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+58850&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#98720) next »