From:             johannes dot hilpold at s-planet dot de
Operating system: Windows XP SP1
PHP version:      4.3.0
PHP Bug Type:     Session related
Bug description:  session_id(...) causes same cookie to be sent more than once

The following seems not to be an important bug, but a little modification
to PHP behaviour or some documentation on this could be useful:

If you use session_id("...") [ "..." means a normal SESSID] to force a
special SESSID, session_start() will always(!) send the session cookie -
even if the client sent the cookie with exactly this SESSID in the
request.

Now the Problem:
================
--> At least IE6 will hang endless (looks as if still loading the page)
when receiving an identical session cookie the third time.

The normal way:
===============
session_start() - without using session_id(...) before - will send the
session cookie only if it was not received from the client. This is the
behaviour one would expect and which should be implemented for the case
using session_id(...) too.

Of course there is a workaround available:

if (!$_REQUEST['SESSID'] == "...")
    session_id("...");
session_start();


--> At least a hint in the manual should be included since this may also
cause others to lose some hours for debugging their sript, as me. 
-- 
Edit bug report at http://bugs.php.net/?id=22771&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=22771&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=22771&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=22771&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=22771&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=22771&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=22771&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=22771&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=22771&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=22771&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=22771&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22771&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=22771&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=22771&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=22771&r=gnused

Reply via email to