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). NOTE: A VPS or Dedicated Server with root access is required to follow the steps in this guide. If you are using AlmaLinux 8, then only the following versions of PHP are available through EasyApache 4:
The following versions will not be available when using AlmaLinux 8.
In order to see the most recent versions available, you can run the following command: repoquery --repoid=EA4 --queryformat="%{name}" | grep -Eoh "ea-php[0-9]{2}" | sort | uniq AlmaLinux 8 does not provide support for loading the legacy versions of PHP (pre-version 7.2). Support for these earlier versions can loaded using CentOS. Install from WHMEasyApache 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.
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 CLIEasyApache 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.
NOTE: In our example, PHP 5.5, 5.6, 7.0, and 7.1 are already installed on the server. For this reason, our example command includes each of those PHP versions to install the PHP extension, fileinfo, for all the PHP versions that exist on the server. Simply include each PHP version you want to install the extension for in the command you use. If you do not want the extension installed for a certain PHP version, do NOT specify that version in your command. 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:
For example:
Available PHP ExtensionsBelow is a list of PHP extensions for PHP 8. Available extensions will vary depending on your installed PHP version(s).
You can view the documented PHP extensions list at PHP.net. 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 EasyApache Education Channel for more advanced guides. |