• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

PHP files get downloaded with Fast-CGI

Ulrich_Mayr

New Pleskian
Hi there,

I'm trying to get something simple to work in Plesk. I just want to use Apache for PHP files with Fast-CGI and PHP 5.6. Everything works fine with Nginx and PHP-FPM but because of the restrictions, that Nginx can only use a systemwide PHP version, which is 5.3.3 in my case, I need Apache for that.

So the problem is that I get the .php files as download and Apache doesn't parse them.

A little background information:
Cent OS 6.6
Plesk 12.0.18 Update #49
PHP Versions 5.3.3 and 5.6.9
PHP Handles installed with this KB http://kb.odin.com/125146:
Code:
                  id:  display name:  full version:  version:    type:                        cgi-bin:                    php-cli:                        php.ini:  custom:
                  cgi          5.3.3          5.3.3       5.3      cgi                /usr/bin/php-cgi                                                /etc/php.ini    false
              fastcgi          5.3.3          5.3.3       5.3  fastcgi                /usr/bin/php-cgi                                                /etc/php.ini    false
               module          5.3.3          5.3.3       5.3   module                /usr/bin/php-cgi                                                /etc/php.ini    false
      plesk-php56-cgi          5.6.9          5.6.9       5.6      cgi  /opt/plesk/php/5.6/bin/php-cgi  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini     true
  plesk-php56-fastcgi          5.6.9          5.6.9       5.6  fastcgi  /opt/plesk/php/5.6/bin/php-cgi  /opt/plesk/php/5.6/bin/php  /opt/plesk/php/5.6/etc/php.ini     true

Hostingtemplates are default and I checked every configuration file I've found and searched the web for the last four hours but don't get it, I hope someone here can help me.

Thanks!
Ulrich
 
Hi there,

I already checked those:

the module is active in the Apache settings in Plesk.

and here are the lines from my /etc/httpd/conf/httpd.conf.

Code:
#
# For type maps (negotiated resources):
# (This is enabled by default to allow the Apache "It Worked" page
#  to be distributed in multiple languages.)
#
AddHandler type-map var

Code:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
 
Ok, I'm very confused by this Plesk installation. It seems to work fine now, didn't changed any additional settings or files, looks like a caching thing or something like that...
 
Hi, this happens due to php version miss match. Number of time we found that custom version is set in .htaccess files and due to that files gets downloaded. Simply commenting out can fix the issue. Also setting required version from plesk panel will help as well.
 
Back
Top