- Plesk for Linux
The PHP files are being downloaded instead of being displayed.
PHP handler is absent or incorrectly configured in Apache configuration;
Fcgidmodule for Apache is disabled.
Connect to the server via SSH;
Make sure there are the following lines in the main Apache configuration file (for a RedHat-based system:
/etc/httpd/conf/httpd.conf; for a Debian-based system:
CONFIG_TEXT: 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:
CONFIG_TEXT: AddHandler application/x-httpd-php .php
vhost.confis used and domain configured with PHP FastCGI, ensure that the following conditions are met in sections used to handle PHP scripts:
CONFIG_TEXT: <IfModule mod_fcgid.c>
FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
Check ifOn Ubuntu/Debian OSes:
Fcgidmodule is enabled:
# apache2ctl -M | grep fcgidOn CentOS/RedHat/CloudLinux OSes:
# httpd -M | grep fcgid
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.