Select a PHP Binary
Last modified: May 13, 2020
The cPanel Server Daemon (
cpsrvd) must know the path to the specific PHP binary that you wish to use to process PHP scripts (for example,
phpMyAdmin). There are several PHP binaries from which you may choose.
The cPanel-provided PHP binary
/var/cpanel/usecpphp file, when it exists, causes the
cpsrvd daemon to use a non-system PHP that cPanel, L.L.C. provides. You may wish to use this functionality if Apache’s version of PHP does not include all of the features to run inside of the
cpsrvd daemon. This PHP binary contains all of the necessary options to run inside of the
The cPanel-provided PHP binary exists on the system as one of the following files:
php-cgifile over the php file if both are available and executable.
PHP binary use
/var/cpanel/usecpphp does not exist, WHM uses the PHP binary (
/usr/local/cpanel/3rdparty/bin/php-cgi). You can modify the behavior in the
/var/cpanel/3rdparty/bin/php file. If the binary exists, is executable, and the
/var/cpanel/usecpphp file exists, then the
cpsrvd daemon will always use this binary.
Use the following flowchart to determine which PHP binary the
cpsrvd daemon uses:
cPanel & WHM PHP binary flowchart
- The system prefers the
php-cgifile over the
phpfile if both are available and executable.
- The system only uses the
/usr/bin/phpfile if the
usecpphpfile does not exist and the request is for a third-party product.