note 52689 added to function.session-id

From: Date: Tue, 10 May 2005 01:44:53 +0000
Subject: note 52689 added to function.session-id
Groups: php.notes 
Request: Send a blank email to php-notes+get-89185@lists.php.net to get a copy of this message
Note that Firefox and Mozilla use the same process for launching new windows or tabs, they will pick up the same session id as the previous windows until the parent process dies or is closed. This may cause undesired results if the session id is stored in a db and checked, a solution is to check at the new entry point (new tab or window if the user went back to the index page) for an existing session. If a session id exists and a new one is required use something like: $ses_id = session_id(); $bsid_exists = false; $bsid_exists = check_session_id_from_db($ses_id); if ($bsid_exists){ //This is a reentry and the session already exists // create a new session ID and start a new session_regenerate_id(); $ses_id = session_id(); } ---- Manual Page -- http://www.php.net/manual/en/function.session-id.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52689 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52689&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52689&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52689&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52689&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52689&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52689&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89185) next »