[SOLVED] PHP files downloading and not displaying

Posted 4 months ago
After upgrading one of the servers to run the latest version of PHP as opposed to a severely outdated PHP 5.3 I had a problem were Easy Apache would download the PHP files as opposed to rendering them.

In order to fix this I needed to add the following lines to the .htaccess


AddType application/x-httpd-php .htm
AddType application/x-httpd-php .html
AddHandler x-httpd-php5 .htm
AddHandler x-httpd-php5 .html

<FilesMatch "\.(htm|html|php)$">
SetHandler application/x-httpd-php
</FilesMatch>