#12481 [Com]: Cookie cannot be set if there is no output for a page
| From: | dhemelings at hotmail dot com | Date: | Thu, 17 Oct 2002 21:00:36 +0000 |
| Subject: | #12481 [Com]: Cookie cannot be set if there is no output for a page | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-22694@lists.php.net to get a copy of this message | ||
ID: 12481
Comment by: dhemelings@hotmail.com
Reported By: tcmleung@yahoo.com
Status: Bogus
Bug Type: IIS related
Operating System: Window 2000 and IIS4
PHP Version: 4.0.6
New Comment:
This bug isn't fixed, I installed PHP 4.2.3 on a Win 2000 Server box
and experience the same problem. When I try it on my Win XP machine it
works.
Previous Comments:
------------------------------------------------------------------------
[2002-06-18 18:38:32] sniper@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php
If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.
------------------------------------------------------------------------
[2001-11-11 12:23:33] sander@php.net
Dupe of #9802
------------------------------------------------------------------------
[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