Re: causing HTTP error status

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

 



"Richard Lynch" <ceo@xxxxxxxxx> writes:

> On Thu, May 4, 2006 8:50 am, Nic wrote:
>> I'm having trouble with setting HTTP error status from PHP4.
>>
>> The PHP docs say that if I have this :
>>
>>   <Directory /mydir>
>
> WILD GUESS!!!
>
> Try it with full pathname to /mydir, or perhaps without the leading
> '/' or some combination of more/fewer directories and/or slashes.

No. /mydir is the directory I want the error page served for.

It does actually work outside the PHP environment, eg:

  <Directory /mydir>
    ErrorDocument 404 "hello!!!"
  </Directory>

and requesting /mydir/not_there returns a 404 with "hello!!!" in the
page.

But /mydir/some.php doing: 

   header("HTTP/1.1 404 Rubbish!!!") 

_never_ causes the error document to be picked up.

It's strange because the docs say this can be done; I can't find an
example that is purported to work outside of the docs though.


Nic

-- 
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