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

In cPanel & WHM version 66 and later, EasyApache 4 allows you to use PHP versions that cPanel, L.L.C. does not provide. These PHP versions must be a Software Collection Library (SCL) package and cannot start with the ea- prefix that EasyApache 4 uses. 

  • You cannot use the EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4) to install vendor-provided versions of PHP. You must use yum to install these packages on your system. For more information, read our Yellowdog Updater, Modified (yum) Basics documentation. 
  • After you install the packages, you can use WHM's MultiPHP Manager interface (WHM >> Home >> Software >> MultiPHP Manager) and WHM's MultiPHP INI Editor interface (WHM >> Home >> Software >> MultiPHP INI Editor) to make changes. 

Important:

  • The DSO PHP handler is not available with Red Hat® Enterprise Linux® (RHEL) and CloudLinux™ PHP packages.
  • SCL PHP packages require a vendor prefix in order to install in EasyApache 4. For example, you cannot use RHEL PHP versions 5.4 or 5.5 because these packages do not begin with a vendor prefix. 
  • Not all vendor-provided PHP packages will contain all of the files that EasyApache 4's MultiPHP system requires. You may experience additional limitations.


Potential issues

Some potential issues exist in vendor-provided versions of PHP.

Vendor-provided php.ini does not exist

In some cases, a vendor-provided PHP version's php.ini file will not exist in the directory that cPanel & WHM requires. For example, RHEL's PHP 5.6 .ini file exists in the /opt/rh/rh-php56/register.content/etc/opt/rh/rh-php56 directory, but cPanel & WHM expects it in the /opt/rh/rh-php56/root/etc directory. You must create a symlink in order for the MultiPHP system to read the php.ini file.

To create the symlink, use the following command, where php56 represents the PHP version that you wish to use:

ln -s /opt/rh/rh-php56/register.content/etc/opt/rh/rh-php56 /opt/rh/rh-php56/root/etc 

If you installed the PHP version before you created the symlink, you must reinstall the PHP version with the following command, where php56 represents the PHP version that you wish to use:

yum reinstall rh-php56*
PHP CLI and PHP CGI binaries in different locations

Some PHP versions include the PHP CLI and PHP CLI binaries in different locations than cPanel & WHM's implementation. In these cases, the PHP installation reverses the location of these binaries. If your PHP version does this, then the following issues may occur:

  • The php-cgi binary path will not exist.
  • The php-cli binary path will be incorrect.

To fix this issue, use the following commands, where prefix represents the vendor prefix and package represents the package name:

mv /opt/prefix/package/root/usr/bin/php /opt/prefix/package/root/usr/bin/php-cgi
mv /opt/prefix/package/root/usr/bin/php-cli /opt/prefix/package/root/usr/bin/php
  • No labels