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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

suPHP vs FastCGI PHP Handler

Discussion in 'Workarounds and Optimization' started by Sametto Chan, Sep 9, 2017.

  1. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Seriously, Both suPHP and FastCGI are very better.
    But, FastCGI has security as well.

    Screenshot_1.png

    SuPHP
    SuPHP is used on all of our Shared and Re-Seller server environments, as it is cPanel’s preferred PHP handler, and is noted as the most secure PHP handler. SuPHP works by running PHP as a CGI module on the server which separates each PHP processes under the user in which is running them.

    Pros:
    • Default cPanel PHP Handler
    • PHP processes run under the user in which it is owned to
    • Uses SuExec to run the “forked” secure PHP processes
    • Upload tool’s on your site will provide the proper ownership and permissions to files and updates
    • PHP scripts are unable to be executed unless owned to the proper user
    Cons:
    • Higher CPU usage
    • Creates a new PHP process whenever PHP is needed to run
    • World writeable files will be unable to be executed. (Files with permissions 777)
    • No PHP Caching utility can be used (OPCache, APC, XCache, etc.)

    FCGI
    Commonly known as Fast CGI, and is a higher performance version of the CGI PHP handler and is comparable to DSO.

    Pros:
    • Low CPU consumption
    • Run’s PHP processes as the cPanel user
    • Ability to use Caching extensions
    • Very similar to the DSO handler
    • Able to work with Nginx and non-Apache webservers
    Cons:
    • High memory consumption
    • PHP is running as a constant open process, rather than opening when a PHP request comes to the server

    I picked FastCGI for PHP Handler. What do you think?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The performance often depends on your environment (e.g. hardware, traffic). Feel free to let us know the results.

    Thank you.
     
    Sametto Chan likes this.
  3. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    So, What is your recommend PHP Handler? :)

    But I've picked FastCGI for good site to speed up.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
  5. Anoop P Alias

    Anoop P Alias Well-Known Member

    Joined:
    Mar 31, 2015
    Messages:
    75
    Likes Received:
    10
    Trophy Points:
    8
    Location:
    Kochi,Kerala,India
    cPanel Access Level:
    Root Administrator
    You have got the following wrong
    ##

    PHP is running as a constant open process, rather than opening when a PHP request comes to the server
    ##

    In PHP-FPM only the master process need to be always active .The default 'ondemand' process manager forks a new process only when there is a request . It shuts down the process after n amount of seconds without request too.

    CGI/SuPHP - is a relic and not used by any serious high performance websites. I would suggest going ahead with php-fpm as its best
     
  6. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    Alright, Everyone is just replied there for the suggestion, recommending. :)

    Thanks for the info. I am already enabled PHP-FPM. But PHP Handler doesn't have a PHP-FPM option.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,220
    Likes Received:
    1,376
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    It's not possible to set PHP-FPM the same way you configure a default handler for other handlers such as suPHP or CGI. You can assign PHP-FPM to individual accounts using "WHM >> MultiPHP Manager". You can also enable it for all accounts per the instructions at:

    MultiPHP Manager for WHM - Version 66 Documentation - cPanel Documentation

    Thank you.
     
    Sametto Chan likes this.
  8. Sametto Chan

    Sametto Chan Well-Known Member

    Joined:
    Jun 24, 2016
    Messages:
    242
    Likes Received:
    22
    Trophy Points:
    93
    cPanel Access Level:
    Root Administrator
    Twitter:
    I did just that enabled PHP-FPM, Before new server and installed WHM Step for PHP-FPM to enabled.

    Thanks for the help. You said to choose to use FCGID. I will keep both FastCGI and PHP-FPM to better now.
     
Loading...

Share This Page