#42273 [NEW]: Unable to set multiple cookies with a web page

From: Date: Sat, 11 Aug 2007 19:10:22 +0000
Subject: #42273 [NEW]: Unable to set multiple cookies with a web page
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-115977@lists.php.net to get a copy of this message
From: dancega at comcast dot net Operating system: Vista Business PHP version: 5.2.4RC1 PHP Bug Type: Output Control Bug description: Unable to set multiple cookies with a web page Description: ------------ This problem was encountered with php 5.2.3.3 When using setcookie, only the last cookie is output from the server. Cookies preceeding the last cookie are never sent. This seems to have been an issue with 4.X but seems to have reoccured. Reproduce code: --------------- <?php echo "begin cookie test"; setcookie('firstcookie','the first cookie'); setcookie('secondcookie',"the second cookie"); echo " end cookie test"; ?> Expected result: ---------------- When loading the subsequent page in the same browser session I expect to see $_COOKIE['firstcookie'] $_COOKIE['secondcookie'] Actual result: -------------- I see only $_COOKIE['secondcookie'] I never see $_COOKIE['firstcookie'] Note : this is verified in a utility which allows me to examin http headers. -- Edit bug report at http://bugs.php.net/?id=42273&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42273&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42273&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42273&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=42273&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=42273&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=42273&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=42273&r=needscript Try newer version: http://bugs.php.net/fix.php?id=42273&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=42273&r=support Expected behavior: http://bugs.php.net/fix.php?id=42273&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=42273&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=42273&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=42273&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42273&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=42273&r=dst IIS Stability: http://bugs.php.net/fix.php?id=42273&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=42273&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=42273&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=42273&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=42273&r=mysqlcfg

« previous php.bugs (#115977) next »