Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'EasyApache' started by teo_, Dec 13, 2016.

Tags:
  1. teo_

    teo_ Member

    Joined:
    Nov 21, 2008
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    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?
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    569
    Likes Received:
    40
    Trophy Points:
    28
    Location:
    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.
     
  3. teo_

    teo_ Member

    Joined:
    Nov 21, 2008
    Messages:
    13
    Likes Received:
    1
    Trophy Points:
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,659
    Likes Received:
    1,428
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page