causing HTTP error status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux