Bug #12481 Updated: Cookie cannot be set if there is no output for a page

From: Date: Sun, 11 Nov 2001 17:23:34 +0000
Subject: Bug #12481 Updated: Cookie cannot be set if there is no output for a page
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-70133@lists.php.net to get a copy of this message
ID: 12481 Updated by: sander Reported By: tcmleung@yahoo.com Old Status: Open Status: Duplicate Bug Type: IIS related Operating System: Window 2000 and IIS4 PHP Version: 4.0.6 New Comment: Dupe of #9802 Previous Comments: ------------------------------------------------------------------------ [2001-07-31 05:20:39] tcmleung@yahoo.com Example Below is code for test1.phtml <? setcookie("cokTest","test cookie",0,"/"); header("location:test2.phtml"); ?> End of test1.phtml Below is code for test2.phtml <? echo "CokTest : $cokTest"; ?> End of test2.phtml If I start to run test1.phtml, then the output is as the following: CokTest : It means that $cokTest cannot be set if there is no output in test1.phtml. There is no problem in Linux-apache platform. ------------------------------------------------------------------------ Edit this bug report at http://bugs.php.net/?id=12481&edit=1

« previous php.dev (#70133) next »