ID: 22440 User updated by: garfield_fr at tiscali dot fr Reported By: garfield_fr at tiscali dot fr Status: Open Bug Type: CGI related Operating System: Windows 2000 pro SP3 PHP Version: 4.3.2-dev New Comment:
this is a little page to test the bug : if no cookie are set, click on "setCookie and header" link to set the cookie and redirect to other... cookie are not set !! tested with PHP Version : 4.3.2-RC Build Date : Mar 30 2003 09:11:32 <?php function SetTheCookie(){ setcookie("test","TestValue"); } function set_redir(){ SetTheCookie(); header("Location: ".$_SERVER['PHP_SELF']."?op=other"); } function delcookie(){ setcookie("test",""); } ?> <html> <head></head> <body> Test SetCookie function with Header("Location: ....") function...<br> <a href="<?= $PHP_SELF; ?>?op=set">just setCookie</a><br/> <a href="<?= $PHP_SELF; ?>?op=set_redir">setCookie and header("location:...")</a><br/> <a href="<?= $PHP_SELF; ?>?op=delcookie">delete cookie("location:...")</a><br/> <?php echo "\$_GET : <br><xm>";var_dump($_GET);echo "</xmp><br>"; $op = $_GET['op']; switch ($op){ case "set" : SetTheCookie(); break; case "set_redir" : set_redir(); break; case "delcookie" : delcookie(); break; } echo "\$_COOKIE : <br><xm>";var_dump($_COOKIE);echo "</xmp><br>"; ?> </body> </html> Previous Comments: ------------------------------------------------------------------------ [2003-03-30 17:41:56] garfield_fr at tiscali dot fr I try using last CVS snapshot (30 mar 2003). bug is still here !! setcookie() with header("location: ...") doesn't work ...(test with phpnuke 6.0.17, in login page) ------------------------------------------------------------------------ [2003-03-30 06:46:26] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip This bug is likely fixed by a recent patch in CVS, so please try the latest cvs snapshot again. ------------------------------------------------------------------------ [2003-02-27 08:54:17] [EMAIL PROTECTED] reclassified ------------------------------------------------------------------------ [2003-02-27 07:59:59] garfield_fr at tiscali dot fr I set cgi.rfc2616_headers = 1 ... and I have no change :( and I can't modify my script because I do some tests to give PHP to customers ... ------------------------------------------------------------------------ [2003-02-27 06:11:36] davidfelton at codemasters dot com Have solved it: I set cgi.rfc2616_headers in the php.ini to 1. I didn't know about this new setting. Thanks. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/22440 -- Edit this bug report at http://bugs.php.net/?id=22440&edit=1