How can I enable PHP Extensions in Linux Server ?

 

Linux Fully Managed Dedicated Server comes with full root access where you will be get a control to make any changes at anytime. You will also get a SSH access to manage via SSH. EasyApache 4 allows to enable PHP extesnions and PHP versions and in the server.

Refer the below procedure to enable PHP Extensions by using WHM/SSH.

Via WHM :

1. Login to the WHM as a root
2. Go to “EasyApache 4” under Software Section
3. Click cPanel Default “Customize”
4. Click on PHP Extensions
5. Now see all PHP Versions which are already enabled in the server.

Example : Filter by PHP Version php56 ; php70

6. Choose the PHP Extension which you want to enable and click on Next
7. It will start to Enable PHP extension and will show “Preparing selected packages for review ..”
8. Once you have enabled all the required modules, its go to “Review” section. It will list all the changes that you are going to make by provisioning the current profile.
9. Finally, you can provision the profile by clicking the “provision” button on the bottom of the “Review” page.

Via SSH

EasyApache 4’s packages for PHP extensions use the ea-php##-php-module naming convention.

## represents the PHP version number
module represents the name of the PHP module

For Example :

1. Login to the SSH as root
2. Use the “yum install” command to install your desired Apache or PHP module.

yum install ea-php70-php-zip

Advantages of EasyApache 4 (EA4):-

i) EasyApache 4 installs, configures, updates, and validates your web server, PHP, and other components of your web server.
ii) You can easily install a missing modules and PHP versions from “EasyApache 4” interface in WHM or directly from commandline.
iii) EasyApache 4 supports multiple versions of PHP, etc..,