Re: PHP as ErrorDocuments (Apache)

From: Date: Tue, 05 Sep 2000 23:35:35 +0000
Subject: Re: PHP as ErrorDocuments (Apache)
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-15403@lists.php.net to get a copy of this message
Please try PHP 4.0.2. I fixed some things between 4.0.0 and 4.0.2 that might affect you. -Rasmus On Wed, 6 Sep 2000 o.cook@etoncollege.org.uk wrote: > I'm having a little trouble with using PHP scripts as ErrorDocuments, but > I'm not sure where I'm slipping up. > > For example - I have the following in my .htaccess file: > > <Files "config.inc.php"> > order deny,allow > deny from all > </Files> > <Files "diary_admin.php"> > AuthUserFile /home/ollie/htpasswd > AuthGroupFile /dev/null > AuthName "Diary Admin" > AuthType Basic > <Limit GET POST> > require valid-user > </Limit> > </Files> > ErrorDocument 401 /forbidden.php > ErrorDocument 404 /missing.php > > If I go to http://site.com/non-existant then I get missing.php > - which > parses correctly - great! > > However, if I go to http://site.com/diary_admin.php I get > forbidden.php, > parsed correctly, before I'm even prompted for a username and password. > Sometimes, however, it works. I tried clearing the cache etc. but that > didn't seem to help. > > Can anyone see an obvious mistake that I'm making? For information: Server > Version: Apache/1.3.12 (Unix) PHP/4.0.0 > > Ollie > > P.S. I'm aware that 401 is actually "Authorization Required" and that 403 is > "Forbidden", but am just to lazy to rename the file! :) > > -------------------------------------------- > Ollie Cook +44 (7946) 057 198 > PGP: http://ollie.zenox.dhs.org/pgp-key > -------------------------------------------- > >

« previous php.general (#15403) next »