ID: 47687 Updated by: j...@php.net Reported By: make dot fire at gmail dot com -Status: Analyzed +Status: Assigned Bug Type: HTTP related Operating System: windows vista PHP Version: 5.3CVS-2009-03-17 (snap) Assigned To: pajoye
Previous Comments: ------------------------------------------------------------------------ [2009-03-26 23:11:37] paj...@php.net Confirmed, it is a bug in the FastCGI. I will notice you as soon as an update is available. ------------------------------------------------------------------------ [2009-03-23 08:41:48] make dot fire at gmail dot com yep, I think that you're right. wait for M$ to fix it.. ------------------------------------------------------------------------ [2009-03-18 14:38:24] dmi...@php.net The issue is probably caused by fastcgi module of web server. The PHP sends proper headers, but it looks like fastcgi module sets status to 302 in case it finds "Location" header. ------------------------------------------------------------------------ [2009-03-18 02:16:40] make dot fire at gmail dot com I have tried using PHP 5.2 (5.2.10-dev), both VC6 x86 Non Thread Safe (2009-Mar-18 00:00:00) and VC6 x86 Thread Safe (2009-Mar-18 00:00:00). And have tried on windows vista and windows server 2008, got the same results: test code: code1: <?php header('HTTP/1.1 303 See Other'); header("Location: http://www.php.net/"); exit; ?> code2: <?php header('HTTP/1.1 303 See Other'); exit; ?> code3: <?php header("Location: http://www.php.net/"); exit; ?> the problem only occurs when run php in fastCGI mode(using php-cgi.exe). code1 produce status line: HTTP/1.1 302 Redirect (expected: HTTP/1.1 303 See Other) code2 porduct status line: HTTP/1.1 303 See Other (expected: HTTP/1.1 303 See Other) code3 product status line: HTTP/1.1 302 Redirect (expected: HTTP/1.1 302 Moved Temporarily) when run php in ISAPI mode(using php5isapi.dll) or run php-cgi.exe under commend line, both test codes will produce expected result. it seems that something wrong with header("Location: ") with CGI mode... ------------------------------------------------------------------------ [2009-03-17 14:30:46] make dot fire at gmail dot com If change to ISAPI mode(use php5isapi.dll), the result is expected. <?php header('HTTP/1.1 303 See Other'); header("Location: http://www.php.net/"); exit; ?> will got status line: HTTP/1.1 303 See Other ------------------------------------------------------------------------ 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/47687 -- Edit this bug report at http://bugs.php.net/?id=47687&edit=1