I have a server with suPHP, Apache2 and PHP5.4.
I noticed that a document index.html will execute PHP code, while test.html will not execute PHP code. Of course I do not want that PHP code is executed inside a index.html file.
I do not know where I should look to find the problem. I didn't find a spot in my configuration where I assign the php-handler to some non-*.php-files.
Here is my mods-available/suphp.conf
<IfModule mod_suphp.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-suphp
</FilesMatch>
suPHP_AddHandler application/x-httpd-suphp
# suPHP_PHPPath /usr/bin/php
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
# Order allow,deny
# Allow from all
</FilesMatch>
AddType application/x-httpd-php-source .phps
suPHP_AddHandler application/x-httpd-php-source
# AddHandler application/x-httpd-php-source
<Directory />
suPHP_Engine on
</Directory>
# By default, disable suPHP for debian packaged web applications as files
# are owned by root and cannot be executed by suPHP because of min_uid.
# Benötigen wir für Nagios3
# <Directory /usr/share>
# suPHP_Engine off
# </Directory>
# # Use a specific php config file (a dir which contains a php.ini file)
# suPHP_ConfigPath /etc/php5/cgi/suphp/
# # Tells mod_suphp NOT to handle requests with the type <mime-type>.
# suPHP_RemoveHandler <mime-type>
</IfModule>
Here is my mods-available/php5.conf
<IfModule mod_php5.c>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
# To re-enable php in user directories comment the following lines
# (from <IfModule ...> to </IfModule>.) Do NOT set it to On as it
# prevents .htaccess files from disabling it.
# <IfModule mod_userdir.c>
# <Directory /home/*/public_html>
# php_admin_value engine Off
# </Directory>
# </IfModule>
</IfModule>