#22396 [Opn->Bgs]: session id doesn't change when session_start is called multiple times

From: Date: Tue, 25 Feb 2003 08:31:16 +0000
Subject: #22396 [Opn->Bgs]: session id doesn't change when session_start is called multiple times
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-34187@lists.php.net to get a copy of this message
ID: 22396 Updated by: sniper@php.net Reported By: milan_mlynarcik at hotmail dot com -Status: Open +Status: Bogus Bug Type: Session related Operating System: WinXP PHP Version: 4.3.0 New Comment: Of course it doesn't change..it's already set in the cookie. This is a feature actually.. Previous Comments: ------------------------------------------------------------------------ [2003-02-24 12:39:12] alexws@php.net Confirming. Looks like sessions are started only once. This issue is even with session_write_close(). session_start() after any session-closing commands simply does not work. It would be better if it reloaded session (or created new, depending on was it destroyed or saved). It is a pain to redirect the page to self to get session data again. Hope it'll be fixed. Sometimes it is needed to unlock session/then access it again. ------------------------------------------------------------------------ [2003-02-24 11:34:42] milan_mlynarcik at hotmail dot com <?php session_start(); $sid1 = session_id(); session_unset(); session_destroy(); // ...and create new one session_start(); $sid2 = session_id(); if ($sid1 === $sid2) { print 'equals'; } else { print 'doesn\'t equal'; } ?> This prints 'equals'...is it OK ? I think that session id should change between two different sessions... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22396&edit=1

« previous php.bugs (#34187) next »