PHP attempting to parse non-existent files
| From: | Tim Ward | Date: | Tue, 25 Sep 2001 15:21:43 +0000 |
| Subject: | PHP attempting to parse non-existent files | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-68714@lists.php.net to get a copy of this message | ||
okay, I'll try again. The apache server our site runs on is set up to parse
.html files as php. If you pass a url of a non-existant file to the server
the client gets a php parse error back rather than a 404 error ...
specifically:
pass in
http://www.sitename/fred.html
and you get
Fatal error: Unable to open e:\program files\apache
group\apache\htdocs\dev\maintenance\fred.html in Unknown on line 0
pass in
http://www.sitename/fred.htm (which apache hasn't
been told to treat as PHP)
and you get the expected 404 error which I am well aware can be trapped in
apache.
(n.b. http://www.sitename/bill/fred.html where bill
is a non existant
directory, gives the 404 error okay)
Either this happens to everyone (which apparently it doesn't) or I've got
the configuration wrong somewhere in Apache or PHP. I've trawled through the
on-line documentation for both and haven't found anything relevant. I'm a
programmer not a network or web administrator, but here I'm all there is.
Any ideas what and/or where the problem is?
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html