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!

php-fpm / proxy_fcgi

Discussion in 'EasyApache' started by iddqd_x, Nov 19, 2017.

Tags:
  1. iddqd_x

    iddqd_x Member

    Joined:
    Feb 6, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,

    We have a problem with fpm setup.

    Server details
    /etc/redhat-release: CentOS release 6.9 (Final)
    /usr/local/cpanel/version: 11.68.0.14
    /var/cpanel/envtype: standard

    All packages installed

    Code:
    yum list installed | grep fpm
    ea-php56-php-fpm.x86_64                          5.6.32-1.1.4.cpanel   @EA4   
    ea-php70-php-fpm.x86_64                          7.0.25-1.1.3.cpanel   @EA4   
    ea-php71-php-fpm.x86_64                          7.1.11-1.1.3.cpanel   @EA4
    Code:
    yum list installed | grep cgi
    ea-apache24-mod_cgi.x86_64                       2.4.29-1.1.2.cpanel   @EA4     
    ea-apache24-mod_proxy_fcgi.x86_64                2.4.29-1.1.2.cpanel   @EA4
    Code:
    apachectl -M | grep proxy
     proxy_module (shared)
     proxy_fcgi_module (shared)
     proxy_http_module (shared)
    Problem: FPM works for user John and doesn'r work for user Bob.

    PHP-FPM is turned on like this: Software - MultiPHP Manager - user select - PHP-FPM - On

    User John is able to use CGI and PHP-FPM. "Server API" in phpinfo is "FPM/FastCGI".
    User Bob is able to use only CGI. Even if PHP-FPM is enabled. "Server API" in phpinfo is "CGI/FastCGI".

    I've found only one entry "proxy_fcgi_module" in /etc/apache2/conf/httpd.conf for user John.

    Code:
    <IfModule proxy_fcgi_module>
            <FilesMatch \.(phtml|php[0-9]*)$>
                SetHandler proxy:unix:/opt/cpanel/ea-php70/root/usr/var/run/php-fpm/ed2ffbb8394c52fc41e77d7bda3f9fe35db9042f.sock|$
            </FilesMatch>
        </IfModule>
    There is no PHP-FPM/SetHandler for user Bob. Just for user John.

    When I switch to PHP-FPM in MultiPHP Manager Apache configuration file do not update.

    What could cause this behavior?

    Thank you.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. iddqd_x

    iddqd_x Member

    Joined:
    Feb 6, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello,

    We have mod_cgi and mod_proxy_fcgi (it was installed by EA4 automatically as depency for phpXX-php-fpm package).

    We can't use mod_fcgid (FCGId) in production enviroment as it experimental at this moment.

    What we have now:
    System PHP Version (global) is set to ea-php56

    PHP Version | PHP Handler
    ea-php56 | cgi
    ea-php70 | cgi
    ea-php71 | dso

    Both users can switch to any version (cgi or dso).

    But when I manually turn on PHP-FPM for second user it doesn't work for some reason. First user is OK.
    WHM and cPanel shows that PHP-FPM is on, there is fpm config, socket file for fpm pool and so on.
    But it doesn't update Apache configuration file. When it switched to PHP-FPM there should be lines like "IfModule proxy_fcgi_module" but those lines creates only for first user. Even if PHP-FPM is turned on second user uses cgi as PHP handler, not PHP-FPM.

    Maybe there's something wrong with cPanel-Apache template? It would be great if there some magic script in /scripts/ folder :)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you open a support ticket using the link in my signature so we can take a closer look?

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. iddqd_x

    iddqd_x Member

    Joined:
    Feb 6, 2015
    Messages:
    8
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Problem solved. Ticket ID 9050009. Thank you!
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    To update, this was the result of a custom Apache template. Reverting to the default template looks to have solved the issue.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice