InMotion Hosting Support Center

EasyApache 4 (EA4) makes managing PHP Extensions very simple. If you are currently using EasyApache 3 (EA3), you should upgrade to EasyApache 4. In this guide, you will learn the steps to install the fileinfo PHP extension using EasyApache 4 from your Web Host Manager (WHM) and Command Line Interface (CLI).

Install from WHM

EasyApache 4 is designed as a user-interface for the yum program to integrate into WHM. However, it is important to note that you need to install the PHP extension separately for each PHP version. The instructions below provide the steps to follow to install the PHP extension fileinfo (for PHP versions 5.5, 5.6, 7.0, and 7.1) using WHM.

  1. WHM login screen, Username root, Password field filled, and Log in button highlighted

    Log into WHM as root.

  2. easy entered into WHM search field

    Type 'easy' into the search field in the top left of WHM.

  3. WHM Software EasyApache 4 menu option highlighted

    Under the Software category, click on EasyApache 4.

  4. EA4 Currently Installed Packages Customize button highlighted

    In the Currently Installed Packages section, click on the Customize button.

  5. EA4 PHP Extensions menu option highlighted

    Click on the PHP Extensions option from the left.

  6. EA4 PHP Extensions Search field, fileinfo entered and highlighted

    In the Search field, type to enter 'fileinfo'.

  7. PHP extension fileinfo for PHP version 5.5, 5.6, 7.0, and 7.1 selected and highlighted

    Click the toggle button(s) next to the PHP version(s) that you would like the PHP extension installed for.

  8. EA4 Review menu option highlighted

    Click the Review option from the left.

  9. EA4 Review section displaying the 'Please review the following list of packages you are about to install by provisioning this profile' section

    Confirm the options you selected are listed under the "Please review the following list of packages you are about to install by provisioning this profile." section. Then, click the Provision button.

    EA4 Provision button highlighted
  10. Successful display message displayed and below is the Done button highlighted

    Once the installation is completed, you will receive a message: "The provision process is complete". Click the Done button to finish.

  11. Now that you have completed installing the fileinfo PHP extension from WHM, you can view your phpinfo.php page to confirm it is enabled.

Install from CLI

EasyApache 4 is also designed to allow installation of PHP extensions via the Command Line Interface (CLI) using Yellowdog Updater Modified (yum). Again, it is important to note that you need to install the PHP extension separately for each PHP version.

Also, EA4's packages for PHP modules and extensions use the ea-php##-php-module naming convention. Simply replace ## with the PHP version number (for our example: '55', '56', '70', and '71') and module with the name of the PHP module/extension ('fileinfo' in our example). The steps below indicate how you can install the PHP extension fileinfo from the CLI using yum.

  1. Connect to your server via an SSH connection.

  2. First, update cPanel by running the following command:

    /scripts/upcp

  3. Once "upcp" completes, run the following command:

    yum install -y ea-php55-php-fileinfo ea-php56-php-fileinfo ea-php70-php-fileinfo ea-php71-php-fileinfo

  4. Now that you have completed installing the fileinfo PHP extension from the CLI, you can confirm it is enabled by running the following command (replacing ## with the PHP version you want to check:

    scl enable ea-php## 'php -i' | grep 'fileinfo'

    For example:

    root@localhost ~ $ scl enable ea-php56 'php -i' | grep 'fileinfo'
    Configure Command => './configure' ...'--enable-fileinfo=shared'...'
    /opt/cpanel/ea-php56/root/etc/php.d/fileinfo.ini,
    fileinfo
    fileinfo support => enabled

Now that you know how to install a PHP extension using EasyApache 4, you can continue to customize your server's Apache/PHP environment. Installing other PHP extensions and Apache modules is generally done by following the same process. Be sure to check out our WHM Education Channel for more advanced guides.

Continued Education in Course Web Host Manager (WHM)
You are viewing Section 10: How to Install a PHP Extension Using EasyApache 4
Section 9: Fix cPHulk Brute Force Protection lock out
Section 11: How to Update EasyApache 3 to EasyApache 4

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

Social Media Login

   
Social Login Joomla

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

0 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!