Samet Chan

Well-Known Member
Jun 24, 2016
369
42
153
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?
 

cPanelMichael

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

Anoop P Alias

Well-Known Member
Mar 31, 2015
103
16
18
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
 

Samet Chan

Well-Known Member
Jun 24, 2016
369
42
153
cPanel Access Level
Root Administrator
Twitter
Hi,

I don't have a personal recommendation to offer. The best choice often depends on several factors. Remember to note the information on the following document if you choose to use FCGId:

Apache Module: FCGId - EasyApache 4 - cPanel Documentation

Thank you.
Alright, Everyone is just replied there for the suggestion, recommending. :)

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
Thanks for the info. I am already enabled PHP-FPM. But PHP Handler doesn't have a PHP-FPM option.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
  • Like
Reactions: Sametto Chan

Samet Chan

Well-Known Member
Jun 24, 2016
369
42
153
cPanel Access Level
Root Administrator
Twitter
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.
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.