note 101237 added to function.session-unset
| From: | fgibson75 at gmail dot com | Date: | Sat, 04 Dec 2010 07:54:12 +0000 |
| Subject: | note 101237 added to function.session-unset | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-174607@lists.php.net to get a copy of this message | ||
@dash2nash:
Your PHP is not removing the session variables. Note that the session variables are loaded by the
LAST call in your sequence, session_start(). The preceding calls are irrelevant. For example,
calling session_unset() frees the currently registered session variables -- of which they are none.
The session variables are not being read and instantiated until you reach session_start().
The proper way to destroy a session is documented in session_destroy(). Note that if you are
propagating your session with a cookie, you are also required to remove the cookie. See Example 1.
http://php.net/manual/en/function.session-destroy.php
----
Server IP: 72.55.140.6
Probable Submitter: 96.54.254.46
----
Manual Page -- http://www.php.net/manual/en/function.session-unset.php
Edit -- https://master.php.net/note/edit/101237
Del: integrated -- https://master.php.net/note/delete/101237/integrated
Del: useless -- https://master.php.net/note/delete/101237/useless
Del: bad code -- https://master.php.net/note/delete/101237/bad+code
Del: spam -- https://master.php.net/note/delete/101237/spam
Del: non-english -- https://master.php.net/note/delete/101237/non-english
Del: in docs -- https://master.php.net/note/delete/101237/in+docs
Del: other reasons-- https://master.php.net/note/delete/101237
Reject -- https://master.php.net/note/reject/101237
Search -- https://master.php.net/manage/user-notes.php