|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #24408 misinterpretation (file as a folder/directory - without an error)
Submitted: 2003-06-30 09:40 UTC Modified: 2003-07-03 03:38 UTC
From: theo at sponholz dot de Assigned:
Status: Not a bug Package: *Directory/Filesystem functions
PHP Version: 4.3.1 OS: Linux 2.2.24-6.2.3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: theo at sponholz dot de
New email:
PHP Version: OS:


 [2003-06-30 09:40 UTC] theo at sponholz dot de
the Apache/1.3.26 with php-mod misinterprets a file as a directory
for example:
(there is no dir. "/theo.php/" under "", just a file "theo.php")

if you type "" the site will be shown correctly. 

if you type "" (with an ending [SLASH]), then the server shows a site without CCS and pictures. Boths are included relativ. 

you can add strings like:
instead of returning an error
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 @, but the refers to google ...)
thx 4 help,


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2003-06-30 12:10 UTC]
Too old PHP version, plus it's not a bug but feature.. :)

 [2003-06-30 12:26 UTC] theo at sponholz dot de
is it possible to disable this feature?
 [2003-06-30 13:00 UTC]
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 13:30 UTC] postings-php-bug at hans-spath dot de
I think the "problem" is like this:

If the stylesheet is located at
and is refered like
<link rel="stylesheet" type="text/css" href="style.css">
from theo.php, the browser will search for
if the request was 
but the browser will search for
if the request was 

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">
<link rel="stylesheet" type="text/css" href="">
 [2003-07-03 03:38 UTC] theo at sponholz dot de
i know that i can use absolute links, but i don't want to.
an other problem, caused by my first one, 
is shown @
[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?
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 27 15:01:32 2024 UTC