FS#23815 - php/apache: *.php.* files get processed through php interpreter
Attached to Project:
Arch Linux
Opened by Einar Lielmanis (spic) - Sunday, 17 April 2011, 21:26 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 20 April 2011, 21:08 GMT
Opened by Einar Lielmanis (spic) - Sunday, 17 April 2011, 21:26 GMT
Last edited by Pierre Schmitz (Pierre) - Wednesday, 20 April 2011, 21:08 GMT
|
Details
Description:
When using apache httpd with php-apache, in the default configuration, *.php.* files get passed to php interpreter, even if the real extension is .txt, .gif or whatever. Creating a file foo.php.txt would be handled by php instead of being displayed as text. Additional info: apache 2.2.17-1 php-apache 5.3.6-2 Default configurations. Steps to reproduce: Install apache/php as per wiki, pacman -S apache php-apache vim /etc/php/conf/httpd.conf ... LoadModule php5_module modules/libphp5.so Include conf/extra/php5_module.conf vim /srv/http/foo.php.txt <?php echo "this is php"; /etc/init.d/httpd start curl http://localhost/foo.php.txt Expected: <?php echo "this is php"; Observed: this is php |
This task depends upon
http://httpd.apache.org/docs/current/mod/mod_mime.html#multipleext
PHP is enabled with "addhandler", which means that anything with .php in the extension will be mapped to PHP.