|
|
(9 intermediate revisions by 5 users not shown) |
Line 1: |
Line 1: |
− | Here's our 5 step guide for how to upgrade the PHP version your site hosting WHMCS is running.
| + | #REDIRECT [[PHP Upgrade Guide]] |
− | | |
− | This guide applies to upgrades from any earlier PHP version to PHP 7.0, 7.1 or 7.2.
| |
− | | |
− | By following the steps below (in order), in most cases this will allow you to make the transition with minimal disruption or downtime to your system or workflows.
| |
− | | |
− | ==1. Install Ioncube Loader 10==
| |
− | | |
− | ionCube Loaders 10.1 include support for the new bundled encoding feature from ionCube that makes it possible to encode files in a way that is compatible for all currently supported versions of PHP.
| |
− | | |
− | If you plan to update WHMCS manually, you will need to ensure you have the latest loaders from ionCube installed before starting.
| |
− | | |
− | If you are using the automatic updater, you don't need to do anything. The WHMCS update utility will ensure you have the necessary version of ionCube before beginning, and alert you if not.
| |
− | | |
− | ==2. Upgrade to WHMCS 7.5==
| |
− | | |
− | WHMCS 7.5 supports all currently supported versions of PHP, giving you the widest choice of PHP Versions. It also includes a utility designed to help you identify any custom or 3rd party code that is not ionCube compatible.
| |
− | | |
− | Running WHMCS 7.4 or earlier will only allow you to upgrade to PHP 7.0.x.
| |
− | | |
− | For a full index of PHP compatibility by WHMCS Version, please refer to the [[System Environment Guide#PHP|PHP Compatibility Guide]].
| |
− | | |
− | ==3. Run the WHMCS PHP Version Compatibility Utility==
| |
− | | |
− | Available in WHMCS 7.5 and later, the PHP Version Compatibility Utility can help in identifying custom and 3rd party files which are encoded with ionCube and may not be compatible with newer versions of PHP.
| |
− | | |
− | Accessed via the ''Utilities > System'' menu, where possible, this tool will determine what versions of PHP an ionCube encoded file can work with, and therefore allow you to identify custom or 3rd party code which may need updating prior to upgrading your PHP version.
| |
− | | |
− | More information on this can be found in the documentation for the [[PHP Version Compatibility Assessment]] utility.
| |
− | | |
− | ==4. Assert Compatibility of Custom and 3rd Party Code==
| |
− | | |
− | PHP 7 dropped many [https://secure.php.net/manual/en/migration70.deprecated.php deprecated functions] that must be removed from older code to prevent runtime errors.
| |
− | | |
− | * For any code you have authored, you will need to manually verify this.
| |
− | * For any code you use from 3rd party vendors, you should check with the vendor that any code you use is compatible with the version of PHP you wish to upgrade to. In many cases, you may find that 3rd party vendors have already released updates that are designed to ensure compatibility with newer PHP versions.
| |
− | | |
− | ==5. Upgrade PHP==
| |
− | | |
− | If you've completed steps 1-4, you should now have asserted the following:
| |
− | | |
− | * That you have the necessary ionCube loaders for your target PHP version
| |
− | * That you have a version of WHMCS that supports your target PHP version
| |
− | * That any custom or 3rd party code that is encoded with ionCube is encoded in such a way as to be compatible with your target PHP version
| |
− | * That any custom or 3rd party code is compatible with your target PHP version
| |
− | | |
− | | |
− | With all of those completed, you can now proceed to upgrade the PHP version your site is running.
| |
− | | |
− | If you're running cPanel and EasyApache 4, you can switch the version of PHP your site is running using the [https://documentation.cpanel.net/display/68Docs/MultiPHP+Manager+for+cPanel MultiPHP selector feature] found inside your cPanel control panel.
| |
− | | |
− | If after upgrading, you experience any of the following when visiting any URL within WHMCS or performing specific actions, this indicates that your system or some custom or 3rd party code has an incompatibility with the new PHP version.
| |
− | | |
− | * A 500 internal server error
| |
− | * A blank page
| |
− | * An oops error page
| |
− | | |
− | | |
− | Please see our [[PHP 7 Migration Troubleshooting Guide]] for steps to debug and resolve these issues.
| |
− | | |
− | For an immediate solution, reverting to the previously installed and used PHP version should allow you to re-gain access to the WHMCS system.
| |
− | | |
− | **Last Updated: March 2018**
| |