note 50556 added to function.session-regenerate-id

From: Date: Thu, 03 Mar 2005 10:06:17 +0000
Subject: note 50556 added to function.session-regenerate-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-85860@lists.php.net to get a copy of this message
I am using debian, so my version of PHP4 does not include session_regenerate_id(). I saw the snippet for generating such an id manualy, but there's an easier way: unset($_COOKIE[session_name()]); You can then either start a new session with: session_start(); in which case you're sure you're not using a preexisting session, or continue an old session any other way with: session_id($session_string); session_start(); I also hope this note is instructive about the way session work, because they remain terribly confusing. :) ---- Manual Page -- http://www.php.net/manual/en/function.session-regenerate-id.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50556 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50556&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50556&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50556&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50556&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50556&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50556&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85860) next »