PHP is not being handled correctly.
Anytime we try to access a PHP page, it asks us to download it, instead of processing it properly.
PHP handler is absent or incorrectly configured in Apache configuration.
Fcgidmodule for Apache is disabled.
Make sure there are the following lines in the main Apache configuration file (for RedHat-based system: /etc/httpd/conf/httpd.conf ; for Debian-based system: /etc/apache2/apache2.conf).
AddHandler type-map var AddType application/x-httpd-php .php
If it does not work for the configuration, another option is to specify the handler for PHP files explicitly:
AddHandler application/x-httpd-php .php
vhost.conf is used and domain configured with PHP FastCGI, ensure that the following conditions are met in sections used to handle PHP scripts:
<IfModule mod_fcgid.c> SetHandler fcgid-script FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php Options +ExecCGI </IfModule>
Fcgid module is enabled:
# ls -la /etc/apache2/mods-enabled/ | grep fcgid lrwxrwxrwx 1 root root 28 Dec 7 2015 fcgid.conf -> ../mods-available/fcgid.conf lrwxrwxrwx 1 root root 28 Dec 7 2015 fcgid.load -> ../mods-available/fcgid.load
and if it is not, enable it at Tools & Settings > Apache Web Server > fcgid.
Note If prefork is enabled for Apache webserver in Home > Tools & Settings > Apache Server, make sure that
php5 tickbox is checked.