Red Hat Bugzilla – Bug 163971
Files with .php in the middle of the file name are incorrectly interpreted as PHP
Last modified: 2007-11-30 17:11:10 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; en) Opera 8.01
Description of problem:
A file with .php in the middle of the filename is sent to the PHP interpreter.
For example, somefile.php.gz is sent to PHP instead of being downloaded as a
gzip file. Note it does not even ungzip it first. Does the same with somefile.
php.cow.fish.dog and some.file.php.dog.fish.cow as well.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create test.php, with any text.
2. gzip test.php
3. try to download test.php.gz
Actual Results: The browser gets 0 bytes.
Notice in the apache error log that it tried to interpret it as PHP.
PHP errors out and returns nothing.
Expected Results: It should have downloaded test.php.gz as a gzip file.
I recently upgraded from FC2. It previously worked correctly. The config files
have not changed, so I assume that the build is different.
This is desired behaviour (useful for example with mod_negotiation); you should
be able to use something like:
to prevent it, if you like.
Adding that to php.conf does not help. Adding it to the end of httpd.conf does
Adding this to /etc/httpd/conf.d/php.conf does the trick.
*** Bug 164731 has been marked as a duplicate of this bug. ***