Page tree
Skip to end of metadata
Go to start of metadata

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?

Notes:

  • 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 cPanel & WHM Long-Term Support documentation.

To run EasyApache, use WHM's EasyApache 4 interface (WHM >> Home  >> Software >> EasyApache 4).

EasyApache 4 provides a graphical interface for yum. You can use it on the command line if you prefer. For more information, read our Yellowdog Updater, Modified (yum) 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 the yum update command. 

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.

What kind of symlink race condition protection does EasyApache 4 provide?

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 RPM. 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. 

As of cPanel & WHM version 66, 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 with yum before you can use them. For more information, read our Yellowdog Updater, Modified (yum) 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 or later, or use the /usr/local/cpanel/scripts/migrate_ea3_to_ea4 script. For more information, read our How to Install or Uninstall EasyApache 4 documentation. 

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.

How does the migration to EasyApache 4 impact custom Apache modules?

Important:

You  cannot  migrate from EasyApache 3 to EasyApache 4 if your server runs Tomcat. We will add this functionality in cPanel & WHM version 76. For more information, read our  Tomcat  documentation.

EasyApache 4 removed OptMods and no longer supports them. However, in addition to the new RPM actions that EasyApache 4 can execute from its specification file, we created the yum-plugin-universal-hooks RPM. These new hooks allow for executable actions based on the package name that they operate in. For example, if you run a script on an ea-* package, if any updated packages exist in the ea4 namespace, the system executes these scripts.

If you use custom Apache modules (for example, Cloudflare or PageSpeed), you must recompile and manually install those modules after you finish the migration process.

Note:

EasyApache 4 does not currently support all possible Apache modules (for example, Tomcat or Memcached).

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.

I run a CloudLinux™ server and use the CloudLinux PHP Selector. How will the migration to EasyApache 4 impact this feature?

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

Apache

What functionality changed in Apache 2.4?

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:

[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, 5.5, 5.6, 7.0, 7.1, and 7.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 4only provide PHP versions that php.net currently supports. 

RPMs for unsupported versions of PHP will remain on the cPanel, Inc. 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 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 EasyApache 4 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 Yellowdog Updater, Modified (yum) 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 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 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:

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 Home 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:

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:

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 (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 (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 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, perform the following steps:

  1. Navigate to WHM's  EasyApache 4 interface (WHM >> Home >> Software >> EasyApache 4).
  2. Select the desired profile in the Profile section.
  3. Click Customize.
  4. Set the mod_ruid2 and mod_cgi modules in the Apache Modules section to Uninstalled.
  5. Install EasyApache with the new profile.
  6. 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 Log Files documentation.