Page tree
Skip to end of metadata
Go to start of metadata

For cPanel & WHM version 64

Overview

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

The /var/cpanel/usecpphp file, when it exists, causes the cpsrvd daemon to use a non-system PHP that cPanel, Inc. 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 cpsrvd daemon.

The cPanel-provided PHP binary exists on the system as one of the two following files:

  • /usr/local/cpanel/3rdparty/bin/php
  • /usr/local/cpanel/3rdparty/bin/php-cgi

Note:

The system prefers the php-cgi file over the php file if both are available and executable. 

PHP binary use

If /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

Remember:

  • The system prefers the php-cgi file over the php file if both are available and executable.

  • The system only uses the/usr/bin/php file if the usecpphp file does not exist and the request is for a third-party product.

Additional documentation