#24408 [Bgs]: misinterpretation (file as a folder/directory - without an error)
ID: 24408
User updated by: theo at sponholz dot de
Reported By: theo at sponholz dot de
Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: Linux 2.2.24-6.2.3
PHP Version: 4.3.1
New Comment:
i know that i can use absolute links, but i don't want to.
an other problem, caused by my first one,
is shown @
http://www.sponholz.de/bilder/sp.de.uo.jpg
[some searchengines impair my user online status]
i installed apache 2 (php432) on my local pc [Win32] to check ...
- the same problem
my question:
is it a feature of php or of apache?
THX,
THEO
Previous Comments:
------------------------------------------------------------------------
[2003-06-30 13:30:37] postings-php-bug at hans-spath dot de
I think the "problem" is like this:
If the stylesheet is located at
"http://www.sponholz.de/style.css"
and is refered like
<link rel="stylesheet" type="text/css" href="style.css">
from theo.php, the browser will search for
"http://www.sponholz.de/style.css"
if the request was
"http://www.sponholz.de/theo.php"
but the browser will search for
"http://www.sponholz.de/theo.php/style.css"
if the request was
"http://www.sponholz.de/theo.php/"
So this is indeed no PHP bug, but an Apache feature.
To "fix" this behavior, theo.php should refer to style.css by using
<link rel="stylesheet" type="text/css" href="/style.css">
or
<link rel="stylesheet" type="text/css"
href="http://www.sponholz.de/style.css">
------------------------------------------------------------------------
[2003-06-30 13:00:19] sniper@php.net
Without knowing what you're actually doing there, I've no idea how you
could 'disable' it..
Using 4.3.2 I can't reproduce anything like your site has.
------------------------------------------------------------------------
[2003-06-30 12:26:36] theo at sponholz dot de
is it possible to disable this feature?
THEO
------------------------------------------------------------------------
[2003-06-30 12:10:54] sniper@php.net
Too old PHP version, plus it's not a bug but feature.. :)
------------------------------------------------------------------------
[2003-06-30 09:40:18] theo at sponholz dot de
Description:
------------
the Apache/1.3.26 with php-mod misinterprets a file as a directory
for example:
http://www.sponholz.de/theo.php/
(there is no dir. "/theo.php/" under "http://www.sponholz.de/", just a
file "theo.php")
if you type "http://www.sponholz.de/theo.php" the site will
be shown
correctly.
if you type "http://www.sponholz.de/theo.php/" (with an
ending
[SLASH]), then the server shows a site without CCS and pictures. Boths
are included relativ.
further:
you can add strings like:
"http://www.sponholz.de/theo.php/type.PHP.what.PHP.you/.want"
instead of returning an error
"http://www.sponholz.de/theo.php/"
will be shown.
my problem / wish:
i wanna get an error, when a file or a dir./folder does not exist.
by the way (i tried this @ php.net, but the php.net-server refers to
google ...)
thx 4 help,
theo
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=24408&edit=1
Thread (6 messages)