PHP Upgrades
The version of PHP that the server hosting your WHMCS installation runs is important in order to run WHMCS successfully. To meet each version’s requirements, you must sometimes upgrade the PHP version on your WHMCS installation’s server.
Upgrade PHP
When you upgrade PHP on the server that hosts your WHMCS installation, you will need to perform the following tasks:
- Ensure ionCube Loader® compatibility.
- Ensure ionCube-encoded file compatibility.
- Ensure custom and third-party code compatibility.
- If necessary for the new PHP version, upgrade to a compatible WHMCS version.
- Upgrade PHP.
- Make additional configuration updates.
1. Ensure ionCube Loader compatibility.
ionCube Loader includes support for a bundled encoding feature that WHMCS uses to encode its files. If you use the Automatic Updater, WHMCS will not allow you to begin upgrading WHMCS until you are using the necessary version of ionCube Loader.
You must install the correct ionCube Loader version for your desired version of WHMCS before you update.
- For system requirements for currently-supported versions of WHMCS, see System Requirements.
- For information on requirements while updating from WHMCS versions that have reached End-of-Life (EOL), see Updating Through EOL Versions.
2. Ensure ionCube-encoded file compatibility.
Go to Utilities > System > PHP Version Compatibility to locate any ionCube-encoded files that won’t work with a higher version.
WHMCS does not control these files but, if their encoding is incompatible with your environment, they may negatively affect WHMCS. Make certain that you update these files to ensure compatibility before continuing.
3. Ensure customization and third-party code compatibility.
New PHP versions may introduce changes or remove deprecated functions. To reduce issues, manually verify your custom code and check with third-party vendors to ensure that their code is compatible your desired PHP version. Often, third-party vendors have already released updates to ensure this compatibility.
4. Upgrade to a compatible WHMCS version.
If your current WHMCS version does not support the desired new version of PHP, upgrade WHMCS to a version that does. You can do this at Utilities > Update WHMCS or by performing an update manually.
5. Upgrade PHP.
Before you upgrade PHP, make certain that you have performed all necessary updates for ionCube Loader and WHMCS and that any custom or third-party code (and its encoding) is compatible with your target PHP version. Then, proceed to upgrade the PHP version your site is running.
- If you use cPanel & WHM and EasyApache 4 to host your WHMCS installation, you can use MultiPHP Manager and MultiPHP INI Editor to change your PHP version. For more information, see Update PHP with cPanel MultiPHP.
- For other control panels or systems, consult the vendor’s documentation.
6. Make any additional configuration changes.
After upgrading PHP, you may need to update your configuration to reflect the change. These changes depend on the configuration you choose for your WHMCS installation and any customizations that you use.
For example, some WHMCS installations may require updates to the cron configuration and editing the cron’s php.ini
file.
Common Errors
Errors after upgrading PHP usually indicate an incompatibility (for example, a syntax error or decoding issue).
You may see one of the following common errors after you update your PHP version:
Error | Description | Recommended Solution |
---|---|---|
Oops! Something went wrong and we couldn't process your request | A fatal error has occurred. Usually, this indicates that your version of PHP is missing some of WHMCS’s required extensions or there are PHP files on your system that use deprecated or unavailable functions. | Enable error reporting to find details about the exact issue. |
The file was encoded by the ionCube Encoder for PHP x.x and cannot run... | A file uses encoding for an older version of ionCube Encoder that does not support your version of PHP. |
|
Last modified: October 29, 2024