On Fri, May 5, 2006 3:41 am, Nic wrote: > "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. Hmmmmm. I wonder if it only works in CGI or web SAPI but not the other. Though I can't even guess which way that would go... -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php