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.

PHP files are downloading after EA4 conversion

Discussion in 'EasyApache' started by dazeck, Aug 18, 2016.

  1. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    Hi

    I am very nervous about migrating to EA4 from EA3 on my CloudLinux server so I decided to commission a new VPS on DigitalOcean as it's cheap enough to try for a few days. I have put a trial version of Cpanel on and a trial version of CloudLinux on. EA4 was installed out of the box, and I'm not sure how I've done this but I placed a PHPINFO file into the an account folder and when I access the URL it downloads the PHP file.

    I did try installing the lsapi handler and it was kind of working but I couldn't get the user php.ini files to work so I tried to switch back to suphp and that's where everything went tits up. I've followed the instructions to remove the lsapi handler. I've even provisioned a new profile (several different ones in fact) and nothing works. CGI handler gives a 500 error and suphp downloads the file.

    At the moment I have no confidence in migrating my live server to Easyapache 4, especially reading the issues people are having.

    I'll probably delete the temporary VPS I set up and wait a while.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Please feel free to open a ticket to cPanel Technical Support before killing it. I'm sure they'd be interested in looking at your installation to see what went wrong.
     
  3. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    I'll do that, anything to help the product.
     
    Infopro likes this.
  4. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Hi dazeck,

    Would you kindly post the ticket # once its submitted so we can make sure it gets priority.

    Thanks
     
  5. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    Sure, Ticket Number 7632185. Already had someone look at it and cgi is working but suphp still downloads the php file. That's my major worry because nobody wants that to happen on their production server.
     
    #5 dazeck, Aug 19, 2016
    Last edited by a moderator: Aug 19, 2016
  6. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Indeed, that's a really bad thing to have happen -- especially if you can't manage to fix it quickly. Just from past experience with php files being downloaded when browsed, it seems to pretty much always be an issue with AddHandler stuff in apache. Whether it's a global issue in the Apache config or an issue whereby you have .htaccess files in your accounts that have an AddHandler specifying the now incorrect PHP handler is the question. Somebody posted something very similar to this on these forums somewhere in the past week or two --- trouble with php files being downloaded when browsed instead of of being processed by PHP. And in their case I believe they reported that the AddHandlers had changed and that any custom AddHandler that somebody had in their .htaccess file ended up needing to be modified.

    Post #29 of Request to keep EasyApache 3 is where somebody reported something similar.

    Are you using custom AddHandler lines in your customer's .htaccess files?

    Mike
     
    #6 mtindor, Aug 19, 2016
    Last edited by a moderator: Aug 19, 2016
  7. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    There are no custom addhandlers at all, it was a fresh install of centos, cpanel and cloudlinux I then tried to install lsapi and then roll back to suphp once I'd worked out there was a problem with user php.ini files. There were no "customer" accounts on the new server I just created a pseudo account and created a brand new php file with just phpinfo in it. I was trying to get close to my production server as I could before then hoping to copy over an account. I didn't get that far.
     
  8. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Ok. Then it's good that you opened a ticket with cPanel because it'll definitely need their attention.

    Mike
     
  9. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    There looked to be a missing file required form suPHP to work:
    [01:08:10 vps2 root@7632185 ~]cPs# rpm -V ea-apache24-mod_suphp
    missing c /etc/apache2/conf.modules.d/90-suphp.conf
     
  10. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    What was the fix for this? I've got a test server up and running and have the same issue.

    Mike
     
  11. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    Hi Mike.

    Literally, that's what was in the support ticket, I have no idea what they actually did.
     
  12. mtindor

    mtindor Well-Known Member

    Joined:
    Sep 14, 2004
    Messages:
    1,281
    Likes Received:
    37
    Trophy Points:
    48
    Location:
    inside a catfish
    cPanel Access Level:
    Root Administrator
    Thanks. I got it working. Of course I can't figure out what fixed it. EA4 reconfigure maybe. No idea.

    On another note, I too use mod_lsapi -- and the whole idea that mod_lsapi had to be uninstalled so that the ea4- version of it could be installed threw me off. I was scratching my head for hours trying to figure out why mod_lsapi didn't appear to be working even though when I tailed /usr/local/apache/logs/error_log mod_lsapi was mentioned upon startup. Ended up being that I still had to run:

    /usr/bin/switch_mod_lsapi --setup
    /usr/bin/switch_mod_lsapi --enable-global
    /scripts/restartsrv_apache

    Then I could see in phpinfo that Server API shows Litespeed like it should.

    Mike
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, the issue with suPHP (where access requests resulted in a download of the file) was due to a missing file associated with the ea-apache24-mod_suphp RPM.

    Code:
    # rpm -V ea-apache24-mod_suphp
    missing   c /etc/apache2/conf.modules.d/90-suphp.conf
    The resolution was to reinstall that RPM with the following command:

    Code:
    yum reinstall ea-apache24-mod_suphp
    It looks like the issue is isolated to CloudLinux users who enabled mod_lsap. CloudLinux has published an update with the following change that might help prevent this from happening again:

    removed php-x.x.x-ea4-ini.patch which breaks mod_lsapi in some cases (PHPRC related issues).


    Feel free to open a separate thread if you notice any additional issues.

    Thank you.
     
  14. dazeck

    dazeck Well-Known Member

    Joined:
    Jul 19, 2014
    Messages:
    57
    Likes Received:
    9
    Trophy Points:
    8
    Location:
    England
    cPanel Access Level:
    Root Administrator
    @cPanelMichael thanks for the update, much appreciated. Having CloudLinux and cPanel I never know where to log my issues, but cPanel staff never let me down.
     
    Infopro and cPanelMichael like this.
Loading...

Share This Page