EasyApache 4 FAQ


Last modified: March 27, 2024

General questions

What is EasyApache 4?

EasyApache 4 (EA4) installs, configures, updates, and validates your web server, PHP, and the other components of your web server. EasyApache 4 represents a total overhaul of how cPanel & WHM ships and maintains our Apache and PHP distributions.

We do not require that you use EasyApache, but it provides an easy and convenient way to modify your web server. Your cPanel & WHM license includes EasyApache.

How do I run EasyApache 4?

Note:
  • We strongly recommend that you update your cPanel & WHM version before you run EasyApache 4.
  • We do not support EasyApache functionality on versions of cPanel & WHM that have reached End of Life (EOL). If your version of cPanel & WHM does not support a new feature in EasyApache, your server cannot access that feature.
  • For more information, read our Product Versions and the Release Process documentation.

To run EasyApache, use WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4).

EasyApache 4 provides a graphical interface for package management. You can also install your packages on the command line if you prefer. For more information, read our Package Manager Basics documentation.

Why should I run EasyApache 4, and how often should I run it?

EasyApache 4 provides the following benefits:

  • Updates to PHP, Apache, and the modules that you select.
  • Multiple concurrent versions of PHP.
  • Decreased security vulnerabilities due to automatic updates.
  • A simplified method to add, remove, or install components of your web server.
  • Recommendations about compatibility.
  • Easy access to information about the options you select.

We recommend that you update EasyApache 4 whenever we release an update for software that you use. For example, if you use PHP on your server, update your EasyApache 4 packages each time that PHP releases an update. To automatically update your installed packages, use a cron job, or select Run System Update in the EasyApache 4 interface (WHM » Home » Software » EasyApache 4). You can also update your packages manually with your package manager.

Which EasyApache 4 options should I select?

The EasyApache options that you select will determine what EasyApache builds into your web server. As a general rule, do not select an option unless you need it. For each option that you select, make certain that you understand the functionality of the option and any security vulnerabilities that may come with it. EasyApache provides some preconfigured profiles with recommendations for their use.

Important:

We strongly recommend that you read the EasyApache 4 documentation if you are unsure about which profile to choose. The cPanel Default profile fulfills the requirements of most servers.

EasyApache 4 provides a modified version of the Bluehost.com patch. For more information, read our Symlink Race Condition Protection documentation.

What should I do if I need an Apache module, PHP module, or PHP versions that is not available in EasyApache 4?

EasyApache 4 only supports Apache 2.4. You cannot install an older version of Apache.

If you require a version of PHP that EasyApache 4 does not provide, we recommend that you use the CloudLinux™ PHP Selector, because they provide hardened, secure versions of PHP. Otherwise, you must custom-build the package. For more information, read our The EasyApache 4 Git Repository and Build Updates documentation.

To install a PHP module connect to a yum repository, or use WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4). However, the interface does not support modules that we do not provide.

The MultiPHP system in EasyApache 4 recognizes PHP packages with prefixes other than ea-. This allows the use of vendor-provided packages. You must install these packages before you can use them. For more information, read our Package Manager Basics documentation. After you install the package, you can then access it in the MultiPHP system.

Migrate to EasyApache 4

How do I upgrade to EasyApache 4?

Install EasyApache 4 with the EasyApache 4 interface (WHM » Home » Software » EasyApache 4) on systems that run cPanel & WHM version 60 through 76, or use the /usr/local/cpanel/scripts/migrate_ea3_to_ea4 script.

Note:

You must migrate to EasyApache 4 before you upgrade to cPanel & WHM version 78. EasyApache 3 blocks cPanel & WHM version 78.

Can I keep my custom configurations?

If you upgrade from EasyApache 3 to EasyApache 4, the system attempts to preserve your custom modifications. However, you may need to perform additional configuration manually.

Will EasyApache 4 migrate my custom MIME types?

EasyApache 4 does not migrate custom MIME types. You must adjust these manually after you migrate your system. EasyApache 4 attempts to match MIME types with the appropriate PHP versions.

How will the migration to EasyApache 4 impact the CloudLinux PHP Selector on a a CloudLinux™ server?

Some CloudLinux PHP Selector users may experience a few issues when they migrate to EasyApache 4. The CloudLinux team continually works with WebPros International, LLC to improve their integration with cPanel & WHM and EasyApache 4.

Apache

What functionality changed in Apache?

Apache 2.4 introduced changes to Apache’s configuration file. cPanel & WHM servers use the AdvConfig feature to manage the httpd.conf configuration file. We updated this feature to handle Apache upgrades and downgrades. Apache 2.4 also introduced, renamed, and removed several directives.

Why does Apache restart every ten minutes

This is normal behavior. The cpanellogd daemon sends Apache a SIGUSR1 (graceful restart) signal every ten minutes so that it can rotate log files and process statistics.

What are Apache dummy requests?

Apache occasionally starts processes that listen for new connections. To do this, Apache uses an HTTP request that Apache sends to itself (a dummy request). You can safely ignore these dummy requests.

  • Dummy requests appear in access log files with the local host (127.0.0.1 for IPv4 or ::1 for IPv6) as the remote address.
  • On a lightly-loaded server, WHM’s Apache Status interface (WHM » Home » Server Status » Apache Status) frequently displays a high number of dummy request connections. This occurs because the feature displays the last request to a worker slot (typically, a dummy request that starts a process so that the process can repeat).

Dummy requests cannot use SSL. Servers with hosts that use SSL may receive entries in the log file that resemble the following example:

1
2
3
4
5
[info] [client ::1] Connection to child 6 established (server localhost:443)
[info] Seeding PRNG with 656 bytes of entropy
[info] [client ::1] SSL library error 1 in handshake (server localhost:443)
[info] SSL Library Error: 336027900 error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol speaking not SSL to HTTPS port!?
[info] [client ::1] Connection closed to child 6 with aborative shutdown (server localhost:443)

PHP

Which PHP versions does EasyApache 4 support?

EasyApache 4 supports PHP versions 5.4 through 5.6, PHP versions 7.0 through 7.4, and PHP 8.0 through 8.3.

The cPanel default profile includes PHP versions 8.1 and 8.2.

Note:

EasyApache adheres to the php.net supported versions timeline. The profiles that we supply in WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4) only provide PHP versions that php.net currently supports. Packages for unsupported versions of PHP will remain on the WebPros International, LLC mirrors and servers, but we will not provide any further updates.

How do I install a vendor-provided version of PHP?

In cPanel & WHM version 66 and later, EasyApache 4 allows you to use PHP versions that WebPros International, LLC 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 a package manager to install these packages on your system. For more information, read our Package Manager 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 PHP handler is not available with rh- and alt- PHP packages.
  • cPanel & WHM does not support DSO on PHP 8.0 and higher.
  • 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:

1
2
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

Can I install more than one version of PHP?

Important:

PHP 7.0 and higher requires EasyApache 4 and cPanel & WHM version 54 or higher.

Yes. To install multiple versions of PHP on your system, perform the following steps:

  1. Configure your system in WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4).
  2. Assign PHP versions to your users in WHM’s MultiPHP Manager interface (WHM » Home » Software » MultiPHP Manager).

For more information, read our PHP documentation.

How can I install PHP PECL Packages?

EasyApache 4 supports PHP PECL module installations. To install a PECL module on your EasyApache 4 system via the command line, run the following command as the root user:

scl enable ea-ssh2 'pecl install ssh2'
Note:

In this example, ssh2 represents the PECL module that you wish to install. To install the development version of a module, affix -alpha to the end of a module name.

To more easily allow you to install PECL and PEAR extensions, we also provide the following symlinks:

  • PECL — /usr/bin/ea-php##-pecl, where ## represents the two-digit PHP version.
  • PEAR — /usr/bin/ea-php##-pear, where ## represents the two-digit PHP version.

How do I install ImageMagick®?

To install and activate ImageMagick, run the following commands as the root user:

1
2
3
yum install ImageMagick ImageMagick-devel
yum install pcre-devel
scl enable ea-php## "pecl install imagick"
Note:

In this example, ## represents the server’s PHP version. For example, if your server runs PHP 7.0, you would use ea-php70.

Common issues and errors

I receive a transaction check error when I run the yum update command

You may receive the following transaction check error message:

1
2
3
4
Transaction check error:
 file /usr/lib/debug/usr/lib64/apache2/modules/libphp5.so.debug conflicts between attempted installs of ea-php55-php-debuginfo-5.5.30-7.7.x86_64 and ea-php56-php-debuginfo-5.6.16-5.7.x86_64
 file /usr/lib/debug/usr/lib64/apache2/modules/libphp5.so.debug conflicts between attempted installs of ea-php54-php-debuginfo-5.4.45-7.7.x86_64 and ea-php55-php-debuginfo-5.5.30-7.7.x86_64
 file /usr/lib64/apache2/modules/libphp5.so from install of ea-php55-php-5.5.30-7.6.x86_64 conflicts with file from package ea-php54-php-5.4.45-7.6.x86_64

The All PHP EasyApache 4 profile originally contained a DSO package for each version of PHP, which resulted in the installation of multiple DSO packages. We adjusted this profile to require that you install DSO manually with either WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4) or yum.

This error occurs when multiple DSO packages exist on the system. You can only run one DSO package at a time. You must manually adjust your system to correct this error.

To correct this error, perform the following steps:

  1. In the PHP Handlers section of WHM’s MultiPHP Manager interface (WHM » Home » Software » MultiPHP Manager), look for multiple instances of the DSO handler. Determine the PHP version that you wish to use with DSO.
  2. Log in to your server as the root user.
  3. Run the following command:
    Note:

    This example assumes that you want to use DSO with the ea-php56 package. As a result, it removes all versions of DSO except the one that the ea-php56 package uses.

      yum remove ea-php54-php ea-php54-php-debuginfo ea-php55-php ea-php55-php-debuginfo
  4. Run the yum update command.

I use DSO and my PHP configuration is not correct

This error occurs in the following circumstances:

  • Your system runs cPanel & WHM version 64 or higher.
  • You use DSO and PHP.
  • You changed your PHP configuration in WHM’s MultiPHP INI Editor interface (WHM » Home » Software » MultiPHP INI Editor).
  • You changed your PHP version to a different major version. For example, from PHP 5 to PHP 7, or vice versa.

In cPanel & WHM version 64 and higher, cPanel’s MultiPHP INI Editor interface (cPanel » Home » Software » MultiPHP INI Editor) writes PHP configuration changes to your php.ini file, .user.ini file, and .htaccess file. You can only use the DSO PHP handler with one version of PHP at a time. Because of this limitation, if you change your PHP configuration and then change your PHP version, the .htaccess file’s directives will not apply.

To fix this issue, open cPanel’s MultiPHP INI Editor interface (cPanel » Home » Software » MultiPHP INI Editor) and apply your settings again. The .htaccess file will update with the proper directives.

I received a mysql connect () error when I upgraded to EasyApache 4

EasyApache 4 uses the mysqlnd native driver. This driver does not support old pre-MySQL 4.1 passwords. We strongly recommend that you update all of your MySQL database password hashes before you upgrade to EasyApache 4.

I received a 500 error after I updated Apache

After you updated to Apache 2.4.27-8, you may see an error that resembles the following example in your error log:

/home/phpinisuphp/public_html/.htaccess: Could not register method 'abcxyz' for <Limit from .htaccess configuration

This error occurs because of Apache changes related to the optionsbleed vulnerability, addressed with CVE-2017-9798. Due to this vulnerability, Apache no longer allows you to create custom .htaccess registers at runtime. If you require custom registers, you must create them with a custom virtualhost include file. For more information about custom include files, read our Advanced Apache Configuration documentation.

I received a File size limit exceeded error

If you see the following error, it usually indicates that a log file is too large for the system (generally, 2 GB or more):

[notice] child pid x exit signal File size limit exceeded (25)

To address this issue, run the /usr/local/cpanel/scripts/biglogcheck script.

If your server hosts extremely large or active websites that reach this limit often, you may wish to disable logging for that website. If you disable logging, your server’s performance will increase and you will avoid this error.

Note:

If you disable logging, the system will not generate statistics for that domain.

I received a Partial content error

If you receive an HTTP Error code: 206 Partial content error message, perform the following steps to find the cause:

  1. Log in via SSH as the root user.
  2. Run the tail -f /usr/local/apache/logs/error_log command.
  3. Refresh the page that contains the error in your browser. The SSH session will display an error message that contains information about the error.

I receive a Not Supported error when I access my website with a mod userdir style URL

Apache’s mod_userdir module allows visitors to access a website via a URL that contains the user’s username. For example, the following URLs use the mod-userdir-style:

  • http://host.example.com/~username
  • http://example1.com/~username
  • http://192.168.0.20/~username

This URL style causes a conflict with the mod_ruid2 and mod_cgi modules, which Apache enables by default when you install EasyApache 4.

To configure your server to allow access to websites via this style of URL, navigate to WHM’s EasyApache 4 interface (WHM » Home » Software » EasyApache 4). Then, perform the following steps:

  1. Select the desired profile in the Profile section.
  2. Click Customize.
  3. Set the mod_ruid2 and mod_cgi modules in the Apache Modules section to Uninstalled.
  4. Install EasyApache with the new profile.
  5. Set your PHP handler to use suPHP in WHM’s MultiPHP Manager interface (WHM » Home » Software » MultiPHP Manager).

I received an a fatal error or timeout occurred while processing this directive error

If you receive an a fatal error or timeout occurred while processing this directive error, check the /usr/local/cpanel/logs/error_log file for more information about the specific error that the system encountered. For more information, read our The cPanel & WHM Log Files documentation.

I received a yum cache error

EasyApache 4 attempts to resolve any yum cache issues that you may experience. If you experience issues with the yum cache, run one of the following commands:

whmapi1 package_manager_fixcache

If the package_manager_fixcache API call does not return the cache_seems_ok_now value, the system could not resolve the yum error. This usually results from one of the following issues:

  • Network issues with your server or upstream provider.
  • Disk issues, such as bad permissions or free space.
  • An invalid yum configuration.
  • Another error. You must check the error that yum returns and resolve the issue manually.

Additional Documentation