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!

SOLVED PHP FPM and SuPHP/Fastcgid

Discussion in 'EasyApache' started by PowerChaos, Feb 23, 2018.

Tags:
  1. PowerChaos

    PowerChaos Member

    Joined:
    Feb 5, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    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
     
  2. vacancy

    vacancy Well-Known Member

    Joined:
    Sep 20, 2012
    Messages:
    179
    Likes Received:
    22
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
  3. PowerChaos

    PowerChaos Member

    Joined:
    Feb 5, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    Thank you for your reply

    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
     
  4. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    91
    Likes Received:
    14
    Trophy Points:
    8
    Location:
    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
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael and PowerChaos like this.
  5. PowerChaos

    PowerChaos Member

    Joined:
    Feb 5, 2010
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    51
    ok thank you
    This is wat i was looking for

    Greets From Powerchaos
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

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

    I've marked this thread as solved.

    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