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.

Switched to Event MPM, Confused About PHP Handlers

Discussion in 'EasyApache' started by linux4me2, Aug 17, 2016.

Tags:
  1. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    83
    Likes Received:
    15
    Trophy Points:
    8
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I'm running CENTOS 6.8 x86_64 virtuozzo host with WHM 58.0 (build 20) and EasyApache4 (EA4).

    I used EA4 to switch from the prefork MPM to the event MPM, which went smoothly, but now I'm confused about the PHP handler I'm using. I was using suPHP, and in MultiPHP Manager, it shows I am still doing so. The only options I have for PHP handlers there are suPHP, CGI, and none. I have both ea-php56-php-fpm and ea-php70-php-fpm installed, as well as ea-apache24-mod_proxy_fcgi.

    If I run top, I can see cpanel_php_fpm running, and when php runs I see "php-cgi" in the command column. That makes me wonder if the handler I'm actually using is CGI instead of suPHP.

    I checked the docs for information, but even though the heading says it's for EA4, there's the message that says, "Warning:Do not use this documentation. It is not valid for EasyApache 4."

    How do I tell which handler I'm actually using, and how can I get more options; e.g., FastCGI, FPM, which I think I have already installed, to appear in the MultiPHP Manager?
     
  2. Havri

    Havri Member

    Joined:
    Oct 28, 2013
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Website Owner
    Hello,

    Most likely you are using PHP-CGI and not SuPHP. I am somewhat in a similar situation. I was using mod_fcgid in EA3 and came across some problems in the adoption of EA4. One command that I used to see what handlers I was using one the new systems is (hopefully they help you too):

    /usr/local/cpanel/bin/rebuild_phpconf --current

    There is another command which should let you see which other handlers you can select for your version of PHP:

    /usr/local/cpanel/bin/rebuild_phpconf --available

    You can read more about this here:

    Manage PHP Handlers in EasyApache 4 - EasyApache 4 - cPanel Documentation

    In EA4, I am experimenting with worker MPM, proxy_fcgi + suexec, but I still don't have that option in MultiPHP Manager. I'm still not sure if the fcgi module is being used in any way in the current setup. Although I can confirm that it is installed in apache (apachectl -M | grep -i cgi), I still can't select it as a PHP Handler.
     
  3. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    83
    Likes Received:
    15
    Trophy Points:
    8
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Thanks, Havri. From the link you gave me, I found this page, which explains the commands you gave me and appears to be for WHM v. 58 and EA4.

    As you suggested, I ran the command:
    Code:
    /usr/local/cpanel/bin/rebuild_phpconf
    and it returned:
    So it looks like what I'm seeing in MultiPHP Manager is correct, and I am running suPHP. I was just thrown off by the "php-cgi" I was seeing in top.

    If I run:
    Code:
    /usr/local/cpanel/bin/rebuild_phpconf --available
    it returns:
    Again, exactly what MultiPHP Manager has in the drop-downs for the handlers.

    I don't see anything about adding FCGI/FPM for EA4 in v. 58 of WHM. I guess I'll have to wait for a later version.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    I believe the following document should help to explain how this works:

    The php_cli Program - EasyApache 4 - cPanel Documentation

    You can follow the progress of this feature request at:

    Enhance FPM support

    Let us know if you have any additional questions.

    Thank you.
     
    linux4me2 likes this.
Loading...

Share This Page