[Project_owners] PHP Not Respecting header()

Malte Kraus firefox at maltekraus.de
Wed Dec 19 07:40:41 PST 2007

There's a comment on http://www.php.net/manual/en/function.header.php:
> PHP as CGI treats header differently.
> header("HTTP/1.0 404 Not Found"); returns "404 ok"
> When using PHP (3,4 and 5) as CGI to return a 404 you need to use:
> header("Status: 404 Not Found"); this returns "404 Not Found"
> See: http://bugs.php.net/bug.php?id=27345

For him, PHP returned "Ok" instead of "Bad Request", but maybe the
solution works for you as well?


More information about the Project_owners mailing list