note 44074 deleted from function.session-regenerate-id by tomsommer

From: Date: Wed, 14 Jul 2004 15:21:13 +0000
Subject: note 44074 deleted from function.session-regenerate-id by tomsommer
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-73220@lists.php.net to get a copy of this message
Note Submitter: spam@coreyo.net ---- 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?

« previous php.notes (#73220) next »