From:             rene dot bangemann at web dot de
Operating system: Win32
PHP version:      Irrelevant
PHP Bug Type:     Session related
Bug description:  multiple session_start() creates multiple session cookies in 
HTTP-Response

Description:
------------
I'm using a combination of session_start() and session_write_close() to
access and update session variables.
In some scripts this function calls will be executed up to 50 times.
For each call of session_start() a HTTP-Header with the PHP session id
will be created in the same HTTP response.
I would expect, that in the HTTP response will be only one HTTP-Header
with the session id.

Reproduce code:
---------------
<?php
session_start();
session_write_close();
session_start();
session_write_close();
session_start();
session_write_close();
?>

Expected result:
----------------
HTTP-Header Set-Cookie with PHP session id created only once in HTTP
response

Actual result:
--------------
The code above will create a HTTP response with three identical HTTP
Set-Cookie headers

-- 
Edit bug report at http://bugs.php.net/?id=31455&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31455&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31455&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31455&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31455&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31455&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31455&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31455&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31455&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31455&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31455&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31455&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31455&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31455&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31455&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31455&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31455&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31455&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31455&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31455&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31455&r=mysqlcfg

Reply via email to