InMotion Hosting Support Center

In This Tutorial:

EasyApache (EA) is the software, included with a cPanel installation, that installs, configures, and updates server components like PHP versions and Apache modules. cPanel has recently announced the deprecation of EasyApache 3 (EA3) and that the last version of cPanel to support EA3 is version 11.62. This means that in order to upgrade to cPanel's latest Release (as of August 22, 2017: version 11.66), you will first need to update EasyApache 3 to EasyApache 4. In this guide, you will learn how to migrate EasyApache 3 to EasyApache 4 from the Command Line (CLI) and Web Host Manager (WHM) interface.

Pre-Requisites

Read through the following warnings and notices before proceeding through the following instructions. Regardless of which method of migration you choose to utilize, this will ensure that you are fully aware of what is needed prior to updating EasyApache 3 to EasyApache 4.

Install from CLI

  1. Connect to your server as root via an SSH connection.

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

    /scripts/upcp

  3. Run the following command to initiate the migration process:

    /usr/local/cpanel/scripts/migrate_ea3_to_ea4 --run

  4. Review the warning that appears. This is where you can identify customizations that you may need to manually install after the migration. Typically, most of the components listed are no longer necessary or needed. Type y (for yes) and then press the Enter key to continue.

  5. root@localhost ~ $  /usr/local/cpanel/scripts/migrate_ea3_to_ea4 --run
    checkyum version 22.3
    info [migrate_ea3_to_ea4] Setting the system default PHP version to v5.6 using the Apache 'suphp' handler.
    info [migrate_ea3_to_ea4] Data store file /etc/cpanel/ea4/php.conf does not exist. Attempting to create empty datastore.
    ⚠ As of cPanel & WHM version 58, EasyApache 4 is stable and ready for production.
    For more information, read our EasyApache 4 documentation (https://go.cpanel.net/EA4).
    By continuing, you agree that you understand the following information:
    - While the system runs the migration script, some of cPanel & WHM’s features may not operate.
    - Wait for the system to complete the script before you attempt any other actions on your server.
    - If you revert to EasyApache3, the system automatically rebuilds PHP. This may take 15 - 30 minutes or longer to complete.
    	- Do you wish to continue? [y/n]
    
    
  6. Review the warnings related to the current configuration that cPanel identifies. This is where you can also identify customizations that you may need to manually install after the migration. Typically, most of the components listed are no longer necessary or needed. To proceed, type y (for yes) and then press the Enter key to continue.

  7. Warnings/Blockers from Vendor: Cpanel
    Cpanel Migrate Blocker 
    Cpanel evaluates known issues such as network connectivity
    
    WARNING Adding the missing package, ea-apache24-mod_suexec, to the EasyApache 4 profile.
    WARNING Current profile has the following MPMs: ea-apache24-mod_mpm_worker
    WARNING ea-apache24-mod_mpm_worker found, removing conflicting php DSO package
    WARNING “Cpanel::Easy::Apache::Fastcgi” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::Apache::Fileprotect” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::Bcmath” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::Calendar” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::CurlSSL” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::FTP” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::Imap” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::MagicQuotes” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::MysqlOfSystem” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::Openssl” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::Sockets” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP4::Zlib” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::Curlwrappers” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::Dbase” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::MM” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::MagicQuotes” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::MailHeaders” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::Mhash” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::MimeMagic” ignored since it does not have an RPM.
    WARNING “Cpanel::Easy::PHP5::ZendMultibyte” ignored since it does not have an RPM.
    		
    
    
    	 - Do you wish to continue? [y/n]
  8. Review the information displayed regarding the conversion from EA3 to EA4. Again, this is where you can identify customizations that you may need to manually install after the migration. Typically, most of the components listed are no longer necessary or needed. To continue, type y (for yes) and then press the Enter key.

  9. info [migrate_ea3_to_ea4] 
    info [migrate_ea3_to_ea4] 
    EasyApache 4 Installing preliminary tools.
    info [migrate_ea3_to_ea4] 
    EasyApache 4 converted your EasyApache 3 profile, with warnings.
    
    info [migrate_ea3_to_ea4] Adding the missing package, ea-apache24-mod_suexec, to the EasyApache 4 profile.
    info [migrate_ea3_to_ea4] Current profile has the following MPMs: ea-apache24-mod_mpm_worker
    info [migrate_ea3_to_ea4] ea-apache24-mod_mpm_worker found, removing conflicting php DSO package
    info [migrate_ea3_to_ea4] “Cpanel::Easy::Apache::Fastcgi” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::Apache::Frontpage” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::Bcmath” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::Calendar” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::CurlSSL” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::FTP” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::Imap” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::MagicQuotes” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::MysqlOfSystem” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::Openssl” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::Sockets” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP4::Zlib” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP5::Curlwrappers” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP5::Dbase” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP5::MM” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP5::Mhash” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP5::MimeMagic” ignored since it does not have an RPM.
    info [migrate_ea3_to_ea4] “Cpanel::Easy::PHP5::ZendMultibyte” ignored since it does not have an RPM.
    
    Do you wish to continue? [y/n]


    The installation process will proceed and the CLI prompt will return when complete.

    info [migrate_ea3_to_ea4] EasyApache 4 has successfully been installed.
    A record of this process may be found at : /usr/local/cpanel/logs/packman/migrate_ea3_to_ea4.Tue_Oct_24_14:56:00_2017.log
    root@localhost ~ $ 

Install from WHM

Once you have configured the Update Preferences accordingly you will be able to follow along with the steps below to migrate EA3 to EA4 from 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. EasyApache 4 Migration button highlighted

    Click on the EasyApache 4 Migration button to proceed.

  5. EasyApache 4 Migrate button highlighted

    After the pre-flight check, review any warnings that are displayed. Then, scroll to the bottom of the page and click the Migrate button to continue.

  6. EasyApache 4 Yes, run EasyApache 4 Migration button highlighted

    Click the Yes, run EasyApache 4 Migration button from the pop-up that displays.

  7. Once the migration completes, you will receive a successful message: "EasyApache 4 Migration has run successfully." Click the Done button to close the Migration tool.

Advanced Troubleshooting

Converting from EasyApache 3 to EasyApache 4 may require extensive modifications after the change. Apache and PHP will be completely rebuilt throughout the process. EA 4 will attempt to match your existing profile; however, it can leave out important Apache or PHP modules. It is strongly recommended that you ensure your websites are still working normally after the migration to EA4. In the following section, we provide insight into possible issues (commonly caused by an EA3->EA4 migration) and how to resolve them.

WordPress Site Error

If you are running a WordPress site, you may receive the following error on any sites using an .htaccess file with a custom suPHP_configpath configured:

“Your PHP installation appears to be missing the MySQL extension which is required by WordPress.”

The issue is that when you use the suPHP_configpath directive, the PHP configuration from the include files located in /opt/cpanel/ea-php##/root/etc/php.d/ will not be loaded. Follow the steps below to resolve this issue.

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

    Log into WHM as root.

  2. WHM Search field multiphp entered and MultiPHP Manager menu option highlighted

    Navigate to the MultiPHP Manager inside of WHM.

  3. WHM MultiPHP Manager PHP Versions tab displaying System PHP-FPM section Off status highlighted

    Under the PHP Versions tab find the System PHP-FPM section and confirm that PHP-FPM is turned off.

  4. Enter description of image

    Scroll down to the Set PHP Version per Domain section and confirm the PHP Version for the cPanel user that owns the website displaying the error.

  5. Log into your server via SSH as root.

  6. Create a backup of your existing php.ini file by running the following command, you may adjust the path according to the actual location (the path specified in this command is the default path for a primary domain in cPanel):

    cp /home/cpuser/public_html/php.ini /home/cpuser/public_html/php.ini.bak

  7. Run the following command:

    cp /opt/cpanel/ea-php##/root/etc/php.ini /home/cpuser/public_html/

  8. Run the following loop to add missing lines to the cpuser's php.ini:

    for i in `ls /opt/cpanel/ea-php##/root/etc/php.d`; do cat /opt/cpanel/##/root/etc/php.d/$i >> /home/cpuser/public_html/php.ini; done

  9. Make a backup of your website's .htaccess file by running the following command, you may adjust the path according to the actual location (the path specified in this command is the default path for a primary domain in cPanel):

    cp /home/cpuser/public_html/.htaccess /home/cpuser/public_html/.htaccess.bak

  10. Add the following code to the top of your website's .htaccess file:

    <IfModule mod_suphp.c>
    suPHP_ConfigPath /home/cpuser/public_html
    </IfModule>

  11. Reload your website and confirm the error no longer displays.

suPHP Configuration File Corruption

When switching to suPHP from CGI or DSO, EasyApache 4 does not add the necessary configuration to /etc/suphp.conf for mapping the different handler directives to their corresponding PHP binary files. You may experience a 500 Internal Server Error on PHP websites after switching to suPHP or websites forcing a download; the Apache error log will display errors like:

Caused by KeyNotFoundException in Configuration.cpp:262: Handler "application/x-httpd-ea-php56" not found
End of script output before headers: phpinfo.php

Follow the instructions below to correct the suPHP configuration file.

  1. Connect to your server as root via an SSH connection.

  2. Create a backup of the suPHP configuration file by running this command:

    cp /etc/suphp.conf /etc/suphp.conf.bak

  3. Run the following command to open the suPHP configuration file:

    nano /etc/suphp.conf

  4. Locate the following lines:

    [handlers]
    ;Handler for php-scripts
    application/x-httpd-php="php:/usr/bin/php"
    application/x-httpd-php4="php:/usr/php4/bin/php"
    application/x-httpd-php5="php:/usr/bin/php"

  5. Add the following lines below the code you found:

    application/x-httpd-ea-php54="php:/opt/cpanel/ea-php54/root/usr/bin/php-cgi"
    application/x-httpd-ea-php55="php:/opt/cpanel/ea-php55/root/usr/bin/php-cgi"
    application/x-httpd-ea-php56="php:/opt/cpanel/ea-php56/root/usr/bin/php-cgi"
    application/x-httpd-ea-php70="php:/opt/cpanel/ea-php70/root/usr/bin/php-cgi"
    application/x-httpd-ea-php71="php:/opt/cpanel/ea-php71/root/usr/bin/php-cgi"
    application/x-httpd-ea-php72="php:/opt/cpanel/ea-php72/root/usr/bin/php-cgi"

  6. Remove any additional lines so that the '[handlers]' section looks exactly like this:

    [handlers]
    ;Handler for php-scripts
    application/x-httpd-php="php:/usr/bin/php"
    application/x-httpd-php4="php:/usr/php4/bin/php"
    application/x-httpd-php5="php:/usr/bin/php"
    application/x-httpd-ea-php54="php:/opt/cpanel/ea-php54/root/usr/bin/php-cgi"
    application/x-httpd-ea-php55="php:/opt/cpanel/ea-php55/root/usr/bin/php-cgi"
    application/x-httpd-ea-php56="php:/opt/cpanel/ea-php56/root/usr/bin/php-cgi"
    application/x-httpd-ea-php70="php:/opt/cpanel/ea-php70/root/usr/bin/php-cgi"
    application/x-httpd-ea-php71="php:/opt/cpanel/ea-php71/root/usr/bin/php-cgi"
    application/x-httpd-ea-php72="php:/opt/cpanel/ea-php72/root/usr/bin/php-cgi"

  7. Once you have added the necessary line(s), press Ctrl + O and then hit Enter to save your changes. Press Ctrl + X to exit nano.

  8. Finally, restart Apache, by running this command:

    /bin/systemctl restart httpd.service

  9. Reload your website to confirm it is loading properly.

Persisting Errors

If you experience any persisting errors and are a customer of InMotion Hosting, please reach out to our Live Support for further assistance.

Congratulations! You are now running EasyApache 4. If you want to learn more about how to use EA4, be sure to check out our guide on installing PHP extensions using EasyApache4.

Continued Education in Course Web Host Manager (WHM)
You are viewing Section 11: How to Update EasyApache 3 to EasyApache 4
Section 10: Enable cPHulk Brute Force Protection
Section 12: How to Change your root Password in WHM

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!