iddqd_x

Member
Feb 6, 2015
8
1
53
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.
 

iddqd_x

Member
Feb 6, 2015
8
1
53
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 :)
 

cPanelMichael

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

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

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,220
463
Problem solved. Ticket ID 9050009. Thank you!
To update, this was the result of a custom Apache template. Reverting to the default template looks to have solved the issue.

Thank you.