PowerChaos

Member
Feb 5, 2010
6
0
51
Hey all,
i got a small problem , or atleast it looks strange to me to be honnest

i got a multi php setup ( 5.6 -> 7.2 )
i enabled the fcgiD handler and SuPHP handler

if i enbale fcgi handler for php 7.2 then all sites use php 7.2 ( as seein in the documentation )

so i need to use SuPHP to enable multiphp to work nice
but that means that fcgi is not used anymore

now when i enable the fcgi handler on php 7.2 and i use FPM for a account with php 5.6 then that account use php 5.6

so my general question
i like the speed of fcgi, sadly a lot of my sites cant handle php 7.2 so they are stuck at 5.6

so does FPM also work if i multi select differend versions ? or is it the same limitation as FCGI ?
and is FPM better to use or is FCGI still better to use for security/speed ?


then a small sitenode , i only enabled FCGI for php 7.2 and SuPHP for 5.6 , but it seems it still takes php 7.2 as php handler

lets wrap the things up in a short question
--------
should i use FPM + FCGI to switch php versions ? or should i use SuPHP

my vps server got 12GB ram but only a 2.2GHZ Quad Cpu ( i preffer ram usage instead cpu usage)

Greets From PowerChaos
 

PowerChaos

Member
Feb 5, 2010
6
0
51
Thank you for your reply

mod_fcgid does not support multi php.
For multi php support you should use suphp + php-fpm.
That is the strange part
at this moment i use mod_fcgid for php 7.1
and my older sites run on php 5.6 but i need to enabled the php-fpm option

settings are as follow:
fcgi handler for php 7.1
suphp handler for php 5.6
php-fpm enabled for accounts on php 5.6
result => php-fpm accounts do have php 5.6 (old scripts)
php-fpm not enabled accounts stays on 7.1 no mather what php version selected (expected behavior of mod_fcgid )

so why does that work then ?
how comes that multi php does work with php-fpm ?
or is php-fpm not the same as fastcgi but just a suphp system?

if i enable php 7.2 with php-fpm , does then all versions change to php 7.2 ? or is each php-fpm a proccess on his own ( so 5.6 stays on 5.6 and 7.2 stays on 7.2 )
so that multi php works as long i keep using the php-fpm option ?

The help post only contains info about fcid
but it does not explain how php_fpm works and why it does support multi php

if this is a bug ( it is not supposed to work that way for example ) then i know that it will not work later on
but if that does exactly what it was made for , then i can use the speed/security of mod_fcgid instead switching to the slower suphp

Greets From PowerChaos
 

Anoop P Alias

Well-Known Member
Mar 31, 2015
103
16
18
Kochi,Kerala,India
cPanel Access Level
Root Administrator
This is all wrong. Php-fpm is not dependent on suphp . To put it simply php-fpm is a standalone PHP application server and Apache httpd use mod_proxy_fcgi to connect to it. The user group setting are defined in the pool files. Once you turn on phpfpm for an account the PHP version can be changed from the cpanel assuming you have fpm installed for all versions. In short just set the default handler to suphp (this is not used anyway) and turn on PHP fpm for the domain . Ensure the sapi shown in phpinfo is FPM . that's it
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello,

I've marked this thread as solved.

Thank you.