Cpanel Important PHP options
Most PHP options simply enable an extension that is shipped with PHP.
CGI — This option is enabled by default. Disabling this option will cause a PHP CLI binary to install in /usr/bin/php and /usr/local/bin/php. When no CGI binary is available, your server will be unable to serve PHP requests without DSO.
Concurrent DSO patch — By default, Apache is unable to load libphp4 and libphp5 simultaneously. This option applies a patch to PHP that versions objects in libphp4 and libphp5. This option will also create new Apache directives so that both PHP 4 and 5 can be communicated with separately.
This option is not required if you will serve both versions of PHP via SuPHP, CGI, or FCGID.
Important: Compiled PHP extensions other than those shipped with PHP will not function correctly with this patch enabled. Enabling this module may also render some PECL and PEAR modules nonfunctional. Do not use this module unless you must serve both PHP 4 and 5 as DSOs and can work around other issues it will case.
Reference: http://cpanel.net/
Apache MPMs and Prefork
Multi-Processing Modules (MPMs)
Multi-Processing Modules (MPMs) are responsible for binding to network ports on the machine, accepting requests, and dispatching children to handle the requests.
MPMs — These modules are only available with Apache 2.x. It is important to remember that only one of these modules can be enabled for Apache 2.0 and 2.2. MPMs allow you to fine-tune how resources are allocated when serving HTTP requests. EasyApache will automatically enable or disable Zend Thread Safe support in PHP, depending upon which MPM you select.
Prefork — This MPM is recommended by cPanel. It causes Apache to fork before requests are made.
Important: If you are using libphp4 or libphp5, you must select Prefork.
Event — Divides the task of serving a single HTTP request across multiple threads.
Worker — Apache forks several times to prevent a single crash from killing the entire Apache process, then each forked process creates numerous threads.
Once the server has been compiled, it is possible to determine which MPM was chosen by using ./httpd -l. This command will list every module that is compiled into the server, including the MPM.
Reference: http://httpd.apache.org/docs/2.0/mod/prefork.html
Cpanel Apache options related to PHP
Apache options that directly affect how PHP is served.
* CGI (mod_cgi) — This module is required for Apache to execute CGI scripts. Leave this option enabled. Disabling it will prevent mod_cgi from serving PHP pages.
* CGID (mod_cgid) — This module is only available for Apache 2.x and is required as a replacement for mod_cgi when using threaded MPMs. If you wish to use a threaded MPM, make sure this module is enabled.
* Mod FCGID — This module is only available with Apache 2.x and allows Apache to create and manage FastCGI server processes that remain in memory between HTTP requests. Because any binary capable of using the FastCGI protocol can be managed using this module, you can enable mod_fcgid independently of FastCGI support in PHP. This would, for instance, allow you to serve Ruby via FastCGI.
Referemce : FastCGI documentation - http://www.fastcgi.com/drupal/node/6
Choosing which main PHP version to build
Though it is possible to enable both PHP 4 and PHP 5, Cpanel recommend only enabling one version of PHP. This is because when only one version is installed, the binaries are configured in such a way to mirror EasyApache’s installation, simplifying configuration and management.
A CGI binary is installed in /usr/bin/php.
A CLI binary is installed in /usr/local/bin/php
.
When both PHP 4 and PHP 5 are enabled, PHP 5 is installed in the standard locations, listed above, while:
A CGI binary for PHP 4 is installed in /usr/php4/bin/php.
A CLI binary for PHP 4 is installed in /usr/local/php4/bin/php.
Pls Note: PHP 4 is no longer supported by its developers. WCpanel strongly recommend you use PHP 5.
Standard PHP extensions
EasyApache has the ability to install, uninstall, and update several popular PHP extensions as part of the build process. When EasyApache runs, it will automatically determine which extensions are active in the main php.ini file at /usr/local/lib/php.ini.
Active extensions will automatically be selected in the EasyApache interface.
Rerunning EasyApache is not required in order to enable or disable the standard PHP extensions. cPanel now provides a tool called
/scripts/phpextensionmgr that can also be used for the installation or removal of PHP extensions.
For detailed information about this tool, run the following command:
/scripts/phpextensionmgr –help