causing HTTP error status
| From: | Nic | Date: | Thu, 04 May 2006 13:50:02 +0000 |
| Subject: | causing HTTP error status | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-235513@lists.php.net to get a copy of this message | ||
I'm having trouble with setting HTTP error status from PHP4.
The PHP docs say that if I have this :
<Directory /mydir>
ErrorDocument 400 /mydir/error.html
</Directory>
then the script /mydir/test.php:
<?php
header("HTTP/1.0 400");
?>
will cause the page /mydir/error.html to be displayed.
But that's not what I get. I just get the error header and no response
body; eg:
HTTP/1.1 400 Bad Request
Date: Thu, 04 May 2006 13:40:02 GMT
Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16
X-Powered-By: PHP/4.3.10-16
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html
This suggests that PHP or Apache is not doing something right, or that
I've got this round the back of my neck.
Anyone help?
Nic Ferrier