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!

suPHP vs CGI with PHP-FPM

Discussion in 'EasyApache' started by filip212, Aug 27, 2017.

  1. filip212

    filip212 Member

    Joined:
    Aug 22, 2017
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Slovakia
    cPanel Access Level:
    Root Administrator
    Hello,
    Which choose is better? CGI handler with PHP-FPM or suPHP handler ?
    CGI handler with PHP-FPM too runs processes as user with his rights or no? What safety? Which one is safier? Which one is faster? Is here any better solutions with best aggregacy performance/security?
     
  2. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    93
    Likes Received:
    14
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    PHP-FPM is the best solution. It runs as user, support opcode caches like opcache , is ultra fast ( faster than lsphp in my personal tests)

    php-fpm is officially in the php core. Used my most high-end PHP based websites
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    Rodrigo Gomes and Sametto Chan like this.
  3. Samet Chan

    Samet Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    335
    Likes Received:
    30
    Trophy Points:
    103
    cPanel Access Level:
    Root Administrator
    Twitter:
    I agreed that.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. filip212

    filip212 Member

    Joined:
    Aug 22, 2017
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Slovakia
    cPanel Access Level:
    Root Administrator
    Ok if i choose cgi handler with PHP-FPM im using this fastest solution right? Because now im using suPHP
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Performance can vary and it often depends on the type of websites you are using and the amount of requests you are serving. Note that CGI and PHP-FPM are two separate handlers.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    93
    Likes Received:
    14
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    php-fpm is a separate application server processing PHP requests.The web server communicates to it using FastCGI protocol over a socket . You only need to proxy the requests to the php-fpm service socket from Apache httpd using mod_proxy_fcgi. SuPHP is technically the CGI sapi with additional security

    So CGI and SuPHP -- are same with SuPHP having additional security - opcode caches won't work - everything is slow! == BAD
    mod_php - fast as apache is embedding the php intrepreter and managing the process- less secure , no user switching unless you use ruid2 == BAD
    php-fpm - Blazing fast and support opcode cache ..user level switching is support in fpm configuration, chrooting is supported , stats , log slow query etc is supported == GOOD
    lsphp - Almost all features of php-fpm ,but is proprietary and works only with CloudLinux or LiteSpeed == GOOD
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  8. filip212

    filip212 Member

    Joined:
    Aug 22, 2017
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Slovakia
    cPanel Access Level:
    Root Administrator
    Thank you but in multiphp manager i can choose only CGI or suPHP (suPHP i must too installl)
    And when i have choosed CGI handler i can set PHP-FPM
    System PHP-FPM
    Turn on/off PHP-FPM for all accounts.

    Is this right or i need manually install PHP-FPM handler?
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    To use PHP-FPM on accounts using PHP 5.6, 7.0, or 7.1, you must install PHP-FPM for those PHP versions. To do so, perform the following steps below:

    1. Open "WHM >> Software >> EasyApache 4".
    2. Install the PHP-FPM package for each version of PHP you want to use it with in your EA4 profile and then provision the profile. EX:

    ea-php56-php-fpm
    ea-php70-php-fpm
    ea-php71-php-fpm

    3. Browse to "WHM >> MultiPHP Manager" and enable PHP-FPM for individual domain names, or enable "System PHP-FPM" to enable it for all accounts assigned your system's default PHP version (as configured in the option above it).

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. filip212

    filip212 Member

    Joined:
    Aug 22, 2017
    Messages:
    19
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Slovakia
    cPanel Access Level:
    Root Administrator
    Yes this i already have but from handlers i can choose CGI or suPHP(suPHP i manually installed) this is no problem yes? Thank you
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,344
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Yes, that's normal. PHP-FPM won't appear in the drop-down box of handlers. Instead, you'd have to enable it for each domain name via "WHM >> MultiPHP Manager" or convert all accounts to it with the "System PHP-FPM" feature.

    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