#24408 [Com]: misinterpretation (file as a folder/directory - without an error)

From: Date: Mon, 30 Jun 2003 18:30:37 +0000
Subject: #24408 [Com]: misinterpretation (file as a folder/directory - without an error)
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-42903@lists.php.net to get a copy of this message
ID: 24408 Comment by: postings-php-bug at hans-spath 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 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"> Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#42903) next »