• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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