EA3 Migration to EA4 for PHP5.5 Versions
We're moving from Easy Apache 3 to 4 so we can migrate our web apps to PHP 7.2+ and upgrade to the latest version of cPanel (current version 76, latest version 78).
One of our servers is configured to use PHP 5.5 to accommodate a Magento 1.7CE website. The other websites and apps are all capable of running PHP5.6.
This blog post Removal of PHP 5.4 and PHP 5.5 in EasyApache Profiles | cPanel Blog seems to indicate EA4 no longer supports PHP 5.5 and will automatically re-provision the websites on the server to use PHP 5.6.
Is that correct? Will the migration automatically upgrade the default version of PHP5.5 to PHP5.6? Or will it migrate across as PHP5.5 and only update if I re-provision using EA4?
Thanks.
-
Some quick feedback on switching from EA3 to EA4 for those about to follow suit. - The EA3 to EA4 upgrade requires an Apache upgrade. In my case this was from 2.2 to 2.4. - The migration automatically switched websites on PHP5.5 to PHP5.6, but I was able to downgrade back to PHP 5.5 afterwards. I'm not sure what the expected behaviour here is, as Michael's comments seem to suggest PHP 5.6 should have been the minimum version, so I wouldn't rely on old versions of PHP being available without cPanel confirmation. - Websites running PHP with a CGI handler (running as nobody) were switched to the suPHP handler and scripts running under the cPanel account. This caused issues with file permissions where some files were not accessible by the cPanel user. - Suspect suExec was turned on following upgrade. This means if you run under CGI with suExex disabled and expect scripts to run as Nobody you may have some permission issues. The only way to turn off suExec in EA4 would appear to be to remove the Apache module. - PEAR modules were not migrated. Image Magic was lost and had to be reapplied. - .haccess php_values caused 500 errors. Frankly, I'm not sure why the .htaccess files ever worked (or at least failed to break) my old configuration of CGI no suExex enabled, but they did, and following the upgrade they didn't. I should say I didn't run the upgrade myself but had hosting support do it so they would be on hand to resolve any issues. It's possible they introduced some of the problems above but I don't think so. Should also say running PHP as a cPanel user with suExec or suPHP handler enabled is the way to go :) 0 -
Hello @JustAGuyUsingWHM, Thanks for sharing your EA4 migration feedback! - The migration automatically switched websites on PHP5.5 to PHP5.6, but I was able to downgrade back to PHP 5.5 afterwards. I'm not sure what the expected behaviour here is, as Michael's comments seem to suggest PHP 5.6 should have been the minimum version, so I wouldn't rely on old versions of PHP being available without cPanel confirmation.
PHP 5.5 is still available as RPM, but it's been removed from the profiles in WHM >> EasyApache 4 and we encourage anyone using it to migrate to a supported PHP version as soon as possible. Here's a blog post we created on this topic: Removal of PHP 5.4 and PHP 5.5 in EasyApache Profiles | cPanel Blog- Websites running PHP with a CGI handler (running as nobody) were switched to the suPHP handler and scripts running under the cPanel account. This caused issues with file permissions where some files were not accessible by the cPanel user.
You can choose the PHP handler for each PHP version via WHM >> MultiPHP Manager in EA4. It's likely the use of suPHP as the default handler for PHP 5.6 (and the switch to PHP 5.6 for the accounts previously assigned PHP 5.5) lead to this issue because PHP 5.6 was not previously assigned it's own handler in EA3.- Suspect suExec was turned on following upgrade. This means if you run under CGI with suExex disabled and expect scripts to run as Nobody you may have some permission issues. The only way to turn off suExec in EA4 would appear to be to remove the Apache module.
The following document offers more information about each PHP handler and suexec in EA4 should you want to enable or disable it post-migration: PHP Handlers - EasyApache 4 - cPanel Documentation- .haccess php_values caused 500 errors. Frankly, I'm not sure why the .htaccess files ever worked (or at least failed to break) my old configuration of CGI no suExex enabled, but they did, and following the upgrade they didn't.
Were you able to determine the reason for the 500 error messages? If not, feel free to share the specific 500 error code message from the Apache error log and the contents of the .htaccess file and we can let you know the cause. Thanks!0 -
Thanks @cPanelMichael. Yes, read most of those docs before upgrading :) .htaccess The .htaccess issues were caused by things like: php_value upload_max_filesize 2M in the .htaccess file explained at PHP: How to change configuration settings - Manual. We were able to remove these and apply to them to the specific PHP version or place them in the php.ini file for a specific php version where necessary. My understanding is that these commands should only work with the Apache PHP Handler not CGI, FastCGI, suPHP etc. The commands weren't wrapped syntax, as they should have been, so threw the error. As I said, not sure why they didn't throw the error with CGI no suExec handlers, I suspect because the module was loaded (but not used as the handler) they were being ignored. Cron and PHP The the other issue we've encountered is with Cron jobs running PHP scripts directly from the command line, where previously php .php worked but stopped following the upgrade because of the new MultiPHP implementation. This seems to provide the guidance need to work around that: EasyApache 4 and the ea-php-cli Package - EasyApache 4 - cPanel Documentation but I'd be interested to know if you have any other pointers. 0 -
Hello, 1. The best approach to modifying PHP configuration values with EA4 is to use WHM >> MultiPHP INI Editor for global changes and cPanel >> MultiPHP INI Editor for account-level changes. These features are designed to automatically detect the PHP version and handler and make changes to the appropriate configuration files. Additionally, these features are designed to account for changes to the account's PHP handler or version in the futures so you don't have to make manual changes every time a version or handler changes. That said, there are some handler-specific notes to be aware of on the following documents: MultiPHP INI Editor for cPanel - Version 78 Documentation - cPanel Documentation MultiPHP INI Editor for WHM - Version 78 Documentation - cPanel Documentation If you'd like to make changes via the command line, I recommend using the following UAPI (for account level changes) and WHM API 1 (for global changes) commands: UAPI Modules - LangPHP - Developer Documentation - cPanel Documentation WHM API 1 Sections - PHP - Developer Documentation - cPanel Documentation 2. For the cron jobs, here's a look at what's recommended for the PHP path (taken from the cPanel UI): [QUOTE] PHP command examples: General example: /usr/local/bin/php /home/cptest01/public_html/path/to/cron/script Domain-specific example: /usr/local/bin/ea-php56 /home/cptest01/domain_path/path/to/cron/script In the above example, replace "ea-php56" with the PHP version assigned to the domain you wish to use. Look in the MultiPHP Manager for the actual PHP version assigned to a domain.
Let me know if this helps. Thank you.0
Please sign in to leave a comment.
Comments
5 comments