#34431 [NEW]: setcookie() and header() only set the last cookie sent.
| From: | brian at risible dot org | Date: | Thu, 08 Sep 2005 16:04:39 +0000 |
| Subject: | #34431 [NEW]: setcookie() and header() only set the last cookie sent. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-84749@lists.php.net to get a copy of this message | ||
From: brian at risible dot org
Operating system: FreeBSD 5.4
PHP version: 5.0.5
PHP Bug Type: Apache2 related
Bug description: setcookie() and header() only set the last cookie sent.
Description:
------------
Using the latest FreeBSD ports of Apache2 (2.0.53) and PHP (5.0.5), the
exact same bug as described in bug #16626 appears, where only the last
cookie sent will be set.
Reproduce code:
---------------
<?php
header("Set-Cookie: cookieone=a");
header("Set-Cookie: cookietwo=b");
header("Set-Cookie: cookiethree=c");
?>
Expected result:
----------------
Server: Apache/2.0.53 (FreeBSD) PHP/5.0.5
X-Powered-By: PHP/5.0.5
Set-Cookie: cookiethree=c
Content-Length: 4
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
200 OK
Actual result:
--------------
Server: Apache/2.0.53 (FreeBSD) PHP/5.0.5
X-Powered-By: PHP/5.0.5
Set-Cookie: cookieone=a
Set-Cookie: cookietwo=b
Set-Cookie: cookiethree=c
Content-Length: 4
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
200 OK
--
Edit bug report at http://bugs.php.net/?id=34431&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34431&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34431&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34431&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34431&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34431&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34431&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34431&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34431&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34431&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34431&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=34431&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=34431&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34431&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34431&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34431&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34431&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34431&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34431&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34431&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34431&r=mysqlcfg