PHP 4.0 Bug #7868 Updated: mod_autoindex breaks when php handles .html files
| From: | stas@php.net | Date: | Sun, 19 Nov 2000 17:10:18 +0000 |
| Subject: | PHP 4.0 Bug #7868 Updated: mod_autoindex breaks when php handles .html files | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-38505@lists.php.net to get a copy of this message | ||
ID: 7868
Updated by: stas
Reported By: andrew@mopedog.com
Status: Closed
Bug Type: Apache related
Assigned To:
Comments:
From mod_autoindex manual:
Filename is treated as a URI path relative to the one used
to access the directory being indexed, and must resolve to a
document with a major content type of "text" (e.g.,
text/html, text/plain, etc.). This means that filename may
refer to a CGI script if the script's actual file type (as
opposed to its output) is marked as text/html such as with a
directive like:
AddType text/html .cgi
For PHP, this does not hold, so mod_autoindex probably won't
work. This doesn't seem to be a PHP bug.
Previous Comments:
---------------------------------------------------------------------------
[2000-11-17 17:18:29] andrew@mopedog.com
When PHP is set to process all .html files, certain functions of mod_autoindex fail. Specifically,
my directory indexes no longer display README.html or HEADER.html files. These are specified by the
following directives in my httpd.conf file:
HeaderName HEADER.html
ReadmeName README.html
If I comment out the following line:
AddType application/x-httpd-php .html
then the normal functionality resumes, with header and readme files prepending and appending
properly. This leaves me with the unfortunate choice of having to deny users the ability to parse
PHP within HTML files or removing the very useful ability to generate raw directory indexes with
headers and footers.
I'm using Apache 1.3.14 and PHP 4.0.3pl1 with RedHat Linux 7.0 on an i686 box.
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=7868