• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue PHP pages are offered to be downloaded!

HALi

New Pleskian
Hello,

i use Plesk Onyx with NGINX (without Apache Proxy),PHP5.6, PHP7.0 and PHP7.1 over PHP-FPM. I work with a lot of Subdomains with own webspaces.
Former I use only PHP 5.6 but after the upgrade to PHP7.x I have a crazy issue. In one abonnements I have a subdomain, there i snot able to render the php files. If I open this page, they download the full php file with all code! When I switch to another PHP version, with apache or nginx or both at proxy I have the same problem anymore...

I run plesk repair over the shell and check this two plesk articles but they dont help me with my problem:

https://support.plesk.com/hc/en-us/articles/213392909

https://support.plesk.com/hc/en-us/articles/213956965


On all other domains, abos with subdomains I dont have this problem. What could be the problem and how can I fix that?
 
If it is not caused by the things discussed in the FAQ articles, you can check whether the PHP scripts on the domain in question start with short openers <? instead of long openers <?php. PHP scripts are interpreted as plain text when they use short openers <? and the option short_open_tag is disabled or set to "off" in the corresponding php.ini file. The default setting of that directive out of the box of Plesk is "on", but maybe you have not upgraded using the Plesk PHP 7, but did your own upgrade???
 
In all scripts I use <?php and I see the short tag is off (standard). I install the other PHP versions over the admin panel.
 
Have you set specific MIME types or handlers in an .htaccess file or as additional hosting parameters?

Sent from my SM-G900F using Tapatalk
 
.htaccess:

<FilesMatch "\.js\.gzip$">
AddType "text/javascript" .gzip
</FilesMatch>
<FilesMatch "\.css\.gzip$">
AddType "text/css" .gzip
</FilesMatch>
AddEncoding gzip .gzip


No additional hosting parameters


The /etc/mime.types in original state but php configured like:

#application/x-httpd-php phtml pht php
#application/x-httpd-php-source phps
#application/x-httpd-php3 php3
#application/x-httpd-php3-preprocessed php3p
#application/x-httpd-php4 php4
#application/x-httpd-php5 php5
 
ok my misstake the problem is another vhost because i use a iframe. in the vhost with the problem info.php downloaded too. the php script ist not the problem..i do some changes and then php works again. now i switch vom nginx to apache over fastcgi and now i have the problem again. when i open a url where no file exist, i get a nginx error...but i configured apache. is plesk so bugy?
 
now i create a own vhost for this page but i get the same error. i setup apache over fastgi but if i open a not valid url i get a nginx error and wenn i open the info.php they download this file

\\now i have this problem on more than one Abonnement (vhost)....
 
Last edited:
No this is the reason of the problem. Now I remove nginx completly from plesk and all works fine.
 
Back
Top