SOLVED EasyApache 4 PHP-FPM sometimes downloads PHP files instead of executing

teo_

Member
Nov 21, 2008
13
1
53
I’m using PHP-PFM on WHM 60.0 (build 28) with PHP 5.6 and 7 and it usually works fine, but just now and some weeks ago, visiting php pages, the pages were downloaded instead of shown in browser. This happened for all ea-php70 with PHP-PFM sites on the server.
The only solution I’ve found to quickly restart the service were the command
Code:
/etc/init.d/ea-php70-php-fpm restart
Do you have direction to investigate what should happened?
Is there a method to restart PHP-PFM from WHM gui instead of command line?
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Hello,

Please check if there is any php handler type code added in your website .htaceess file. If yes then try to disable that code.
 

teo_

Member
Nov 21, 2008
13
1
53
I’ve just seen that there are
Code:
# php -- BEGIN cPanel-generated handler, do not edit
# NOTE this account's php is controlled via FPM and the vhost, this is a place holder.
# Do not edit. This next line is to support the cPanel php wrapper (php_cli).
# AddType application/x-httpd-ea-php70 .php .phtml
# php -- END cPanel-generated handler, do not edit
and
Code:
# php -- BEGIN cPanel-generated handler, do not edit
# NOTE this account's php is controlled via FPM and the vhost, this is a place holder.
# Do not edit. This next line is to support the cPanel php wrapper (php_cli).
# AddType application/x-httpd-ea-php56 .php .phtml
# php -- END cPanel-generated handler, do not edit
on all PHP-FPM sites.
I’ll try to uncomment AddType line (just after “Do not edit” :rolleyes:) if it happens again and check what happens.
Thanks.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,218
463
Hello,

You shouldn't uncomment those lines, as "WHM MultiPHP Manager" properly sets those entries as commented when enabling PHP-FPM. Feel free to open a support ticket if the issue with the PHP pages not parsing continues so we can take a closer look. You can post the ticket number here and we can update this thread with the outcome.

Thank you.