note 44074 added to function.session-regenerate-id
| From: | spam at coreyo dot net | Date: | Wed, 14 Jul 2004 14:30:31 +0000 |
| Subject: | note 44074 added to function.session-regenerate-id | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-73217@lists.php.net to get a copy of this message | ||
session_regenerate_id() does not seem to close and open the new session that it creates.
If you call a session_regenerate_id(), then add anything to the session without first closing and
opening the session, it will not be committed to the newly created session. I found that I had to
do this:
session_regenerate_id();
session_write_close();
session_start();
if I wanted to add anything to the new session within the same script after calling
session_regenerate_id(). Set me back 3 hours trying to figure out why my session variables
weren't sticking. Anyone have a better way of doing this?
----
Manual Page -- http://www.php.net/manual/en/function.session-regenerate-id.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+44074
Delete -- http://master.php.net/manage/user-notes.php?action=delete+44074&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+44074&report=yes
Search -- http://master.php.net/manage/user-notes.php