To make understanding the PHP configuration as simple as possible, the core PHP configuration for Apache has been broken out into a separate file that is included into the main httpd.conf. The file is located at /usr/local/apache/conf/php.conf. There are other PHP related directives in the VirtualHost containers of the main httpd.conf file and in the VirtualHost include files under /usr/local/apache/conf/userdata, but these are written in a way that should make them function regardless of how PHP is configured in php.conf.
There is an interface in WHM that assists with configuration of how PHP is served by Apache. It is located under "Service Configuration" and called "Configure PHP and SuExec". A command line interface that serves the same function is available at /usr/local/cpanel/bin/rebuild_phpconf. Both function by rewriting the php.conf file and, when necessary, copying the PHP binaries from /usr/bin/php and /usr/php4/bin/php into /usr/local/cpanel/cgi-sys.
The Five Types of PHP Configuration That Are Possible:
* None - Don't provide access to this version of PHP
* DSO - Provide this version of PHP via libphp4.so or libphp5.so (AKA mod_php). This is normally the fastest possible way to serve PHP requests, but PHP will execute as the user "nobody". If both versions of PHP are available, it is impossible to configure both to be served as DSO unless the concurrent DSO patch was applied at build time.
* SuPHP - Provide this version of PHP through mod_suphp. This is the most flexible way of serving PHP requests and tends to be very secure. PHP scripts are executed by the user who owns the VirtualHost serving the request.
* FCGI - Provide this version of PHP through mod_fcgid. This is a very fast way of serving PHP requests, but php.conf will most likely require additional tuning to perform well. If Suexec is enabled, each user will create their own PHP FastCGI server automatically and PHP scripts will be executed by the user who owns the VirtualHost serving the request. If Suexec is disabled, the "nobody" user will own all of the PHP FastCGI server processes and PHP scripts will be executed by the "nobody" user. FCGI mode is recommended only for advanced administrators who understand how to tune the performance of mod_fcgid. Userdir requests will not function correctly with the basic mod_fcgid setup provided by cPanel.
* CGI - Provide this version of PHP through mod_cgi or mod_cgid. If Suexec is enabled, PHP scripts will be executed by the user who owns the VirtualHost serving the request. If Suexec is disabled, the "nobody" user will execute all PHP scripts. Userdir requrests will not function correctly with the basic CGI setup provided by cPanel. It is intended as a fallback when the other preferred methods (DSO or SuPHP) are not available. Serving PHP as CGI is not particularly secure or fast regardless of whether Suexec is enabled.