#32122 [Opn->Bgs]: header("Status: 404 Not Found"); does not work
| From: | sniper@php.net | Date: | Fri, 04 Mar 2005 15:51:26 +0000 |
| Subject: | #32122 [Opn->Bgs]: header("Status: 404 Not Found"); does not work | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77126@lists.php.net to get a copy of this message | ||
ID: 32122
Updated by: sniper@php.net
Reported By: OvdSpek at LIACS dot NL
-Status: Open
+Status: Bogus
Bug Type: Apache2 related
Operating System: Linux, Windows XP, 2003
PHP Version: 5CVS-2005-03-01
New Comment:
This works:
<?php
header("HTTP/1.0 404 Not Found");
?>
Previous Comments:
------------------------------------------------------------------------
[2005-02-28 22:09:22] OvdSpek at LIACS dot NL
:(
GET /temp/404.php HTTP/1.1
HTTP/1.1 200 OK
Date: Mon, 28 Feb 2005 21:04:06 GMT
Server: Apache/2.0.53 (Win32) PHP/5.1.0-dev
X-Powered-By: PHP/5.1.0-dev
Status: 404 Not Found
Content-Length: 0
Keep-Alive: timeout=15, max=96
Connection: Keep-Alive
Content-Type: text/html; charset=ISO-8859-1
------------------------------------------------------------------------
[2005-02-28 22:01:55] OvdSpek at LIACS dot NL
Will do. Just wondering, why did the summary change from
header("Status: 404 Not Found"); doesn't work to Multiple small packets
send for HTTP request?
------------------------------------------------------------------------
[2005-02-27 12:42:29] OvdSpek at LIACS dot NL
Where do the docs state that?
> Note: In PHP 3, this only works when PHP is compiled as an Apache
module. You can achieve the same effect using the Status header.
This states that if you're using PHP 3, it only works as Apache
module.
It doesn't state that it only works in PHP 3.
------------------------------------------------------------------------
[2005-02-27 12:38:47] tony2001@php.net
The docs clearly state that this example is for PHP3 and you should use
<? header("HTTP/1.0 404 Not Found"); ?> for versions >3.
Please check if it works fine for you.
------------------------------------------------------------------------
[2005-02-26 23:08:38] OvdSpek at LIACS dot NL
Description:
------------
I tried to use the code from the example, but it doesn't work. It
appears the status header has been ignored completely.
http://php.net/header
GET /temp/404.php HTTP/1.0
HTTP/1.1 200 OK
Date: Sat, 26 Feb 2005 22:02:43 GMT
Server: Apache/2.0.53 (Win32) PHP/5.0.3
X-Powered-By: PHP/5.0.3
Status: 404 Not Found
Content-Length: 0
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Reproduce code:
---------------
<?php
header("Status: 404 Not Found");
?>
Expected result:
----------------
HTTP/1.1 404 Not Found
Actual result:
--------------
HTTP/1.1 200 OK
Date: Sat, 26 Feb 2005 22:02:43 GMT
Server: Apache/2.0.53 (Win32) PHP/5.0.3
X-Powered-By: PHP/5.0.3
Status: 404 Not Found
Content-Length: 0
Connection: close
Content-Type: text/html; charset=ISO-8859-1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32122&edit=1