Cpanel Install Php Gd Library
Upgrade Php Cpanel
Overview EasyApache 4 allows the use of multiple versions of PHP. This document explains the ways that you can install a PHP version or a PHP extension.
Determine a user's PHP version There are several ways to determine a user's PHP version. Use WHM's interface ( WHM Home Software MultiPHP Manager). This interface allows you to both see and change a user's default PHP version.
VPS Installation. How do I enable the GD library on a cPanel server? On Step 5 select 'Exhaustive Options' and check the option for GD under 'PHP'. Hi guys, Can anyone tell me how to turn on this plugin on the CPanel server? Activate, install, etc.
This is t he easiest method to determine a user's PHP version. Use cPanel's interface ( cPanel Home Software MultiPHP Manager). View the contents of the user's home directory, located at home/username/publichtml, where username represents the user's username.
Enter the following command on the command line. # BEGIN cPanel-generated handler, do not edit # Use php54 as default AddHandler application/x-httpd-php54.php # END cPanel-generated handler In the above example, # Use php54 as default indicates that the site uses PHP 5.4. Use the API call.
Use the API call. Install a PHP version EasyApache 4 supports PHP versions 5.4, 5.5, 5.6, 7.0, 7.1, and 7.2. Install a PHP version on your system with one of the following methods:. Use WHM's interface ( WHM Home Software EasyApache 4) to select the version of PHP that you wish to load.
Use the yum install command to install your desired PHP version. For more information about yum, read our documentation. You can select from the following PHP packages:. ea-php54. ea-php55. ea-php56.
ea-php70. ea-php71. ea-php72. Any available vendor-provided PHP package Vendor-provided PHP versions. In cPanel & WHM version 66 and later, EasyApache 4 allows you to use PHP versions that cPanel, Inc. 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 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 documentation. After you install the packages, you can use WHM's interface ( WHM Home Software MultiPHP Manager) and WHM's interface ( WHM Home Software MultiPHP INI Editor) to make changes. 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 php56.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. 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. 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 Find a PHP module or extension You can find a PHP module or extension with one of the following methods:. Use WHM's interface ( WHM Home Software EasyApache 4). Run the rpm -qa grep -i package command, where package represents part of the name of the package that you wish to install, to determine if the package is already installed. Run the yum list package command, where package represents part of the name of the package that you wish to install, to determine if the package is available. Install a PHP module or extension EasyApache 4's packages for PHP modules and extensions use the ea-php##-php-module naming convention, where ## represents the PHP version number and module represents the name of the PHP module.
Install a PHP module or extension on your system with one of the following methods:. Use WHM's interface ( WHM Home Software EasyApache 4).
Install the package on the command line with the following command.
First, check if the package wasn't excluded. Open up the yum config with vi /etc/yum.conf and look for a line starting with exclude=if php-gdor php.is mentioned, remove it. Sometimes VPS-hosters won't allow you to use some packages because they hog memory. So you might want to check you aliases by running aliasand check if there is no alias for yumwith an exclude-option. Otherwise you could use RPMForge to install this package: wget rpm -Uhv rpmforge-release-0.5.2-2.el5.rf.i386.rpm yum update && yum install php-gd.