ID: 45697 Updated by: [EMAIL PROTECTED] Reported By: beezlebob666 at yahoo dot com Status: Bogus Bug Type: IIS related Operating System: XP Pro PHP Version: 5.2.6 New Comment:
Also note: Running PHP as ISAPI module is not really supported. Even Microsoft suggests using FastCGI. Previous Comments: ------------------------------------------------------------------------ [2008-08-12 14:43:29] [EMAIL PROTECTED] >From the manual page for header(): "Note: The HTTP status header line will always be the first sent to the client, regardless of the actual header() call being the first or not. The status may be overridden by calling header() with a new status line at any time unless the HTTP headers have already been sent." The correct way to send such headers: <?php header('HTTP/1.1 404 Not Found'); header('Status: 404 Not Found'); var_dump(headers_list()); ?> ------------------------------------------------------------------------ [2008-08-06 05:44:54] beezlebob666 at yahoo dot com Oh and for the record, I have tried setting php.ini with the following: ; if cgi.nph is enabled it will force cgi to always sent Status: 200 with ; every request. cgi.nph = 0 cgi.rfc2616_headers = 0 Although its not in cgi mode,its ISAPI mode so, despite my inexperience, makes sense to try, but it didnt resolve the issue. I have also run a header scanner on my server also, and even though I dont see it, its as if the server is sending a Status: 200 OK before sending Status: 404 ------------------------------------------------------------------------ [2008-08-06 00:18:08] japan at email dot de This sounds like a comparable Sympom of my error message Bug # 45615 of the 2008-07-24 ------------------------------------------------------------------------ [2008-08-03 11:01:06] beezlebob666 at yahoo dot com Description: ------------ In ISAPI mode on IIS on XP, header() does not send anything to the browser. Pear not installed, zend not installed, all .dll files unloaded, default php.ini-dist used. Uninstalled and reinstalled as a CGI mode and it appears to work fine. Reproduce code: --------------- <?php header('HTTP/1.1 404 Not Found'); var_dump(headers_list()); ?> Expected result: ---------------- Expected to redirect to any 404 page. Actual result: -------------- Blank page with no content. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=45697&edit=1