Re: Potential bug?
| From: | Patrik Wallstrom | Date: | Sat, 04 Aug 2001 22:57:52 +0000 |
| Subject: | Re: Potential bug? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61278@lists.php.net to get a copy of this message | ||
On Sun, 22 Jul 2001, Anthony Lieuallen wrote:
> I've just discovered a weird quirk in PHP. I'd first like to check if it is
> a known bug/weird feature/something else already known. I've not yet tested
> it much, except I see it doesn't happen on every script, but either of the
> two results are quite strange to me.
>
> Suituation: file myscript.php exists, directory myscript/ does not. If I
> browse to http://myhost/myscript.php all is well. But
> http://myhost/myscript/ does return something, where I expect a
> '404 not
> found'. Sometimes it just returns myscript.php. BUT sometimes it returns
> the PHP source (minus PHP comments). Aslo,
> http://myhost/myscript/anything/anything/bla.bla.bla returns
> the same.
>
> I was running PHP 4.0.4pl1 on RedHat Linux 6.2, kernel 2.4.6. I upgraded to
> PHP 4.0.6 and still see this behavior.
>
> P.S. For the curious I discovered this because a personal site I have uses
> directory/admin.php for site admin, while another site I am developing at
> work uses directory/admin/ and I typed the wrong one at home :)
I haven't seen this with the php source problem, but otherwise this is a
feature of a default installation of apache. Turn off MultiViews for the
directories with this problem (or globally in httpd.conf).
http://httpd.apache.org/docs/mod/mod_negotiation.html
--
patrik wallstrom | f o o d f i g h t
tel: +46-8-6188428 | s t o c k h o l m
gsm: +46-709580442 | - - - - - - - - -