Difference between revisions of "PHP Migration Guide"

From WHMCS Documentation

(Run the WHMCS PHP Version Compatibility Utility)
(Redirected page to PHP Upgrade Guide)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
The version of PHP that the server hosting your WHMCS installation runs is important in order to run WHMCS successfully.
+
#REDIRECT [[PHP Upgrade Guide]]
 
<div class="docs-alert-success">
 
* The steps below apply to upgrades from PHP 5 or higher to later WHMCS-supported versions of PHP.
 
* We recommend performing the steps below in the presented order for the best experience and a minimized risk of disruption or downtime.
 
</div>
 
 
== Install ionCube® Loader ==
 
 
ionCube Loader includes support for a bundled encoding feature that WHMCS uses to encode files that are compatible with all currently-supported versions of PHP. You must install the correct ionCube Loader version for your desired version of WHMCS '''before''' you update:
 
 
{{:IonCube Loader Version Matrix}} 
 
 
We recommend using the most-recent compatible ionCube Loader version. If you use the [[Automatic Updater]], WHMCS will automatically check for the necessary version of ionCube Loader before beginning the update and alert you if you must update ionCube Loader first.
 
 
== Upgrade WHMCS ==
 
 
Upgrade WHMCS to a version that supports your desired version of PHP. For a full index of PHP compatibility by WHMCS version, see [[System Environment Guide#PHP|System Environment Guide]].
 
 
For a full index of PHP compatibility by WHMCS version, see [[System Environment Guide#PHP|System Environment Guide]].
 
 
== Run the WHMCS PHP Version Compatibility Utility ==
 
 
The report at '''Utilities > System > [[PHP Version Compatibility]]''' in WHMCS 7.5 and later can identify ionCube-encoded custom or third-party code that may not be compatible with newer versions of PHP.
 
 
We recommend running this utility before any change you make to your system's PHP version.
 
 
 
<div class="docs-alert-success">
 
You '''must''' perform a new scan after updating. If you do not, you will see the results of the previous scan, which will incorrectly display incompatibility warnings for files that are now compatible with your system.
 
 
 
Click '''Scan Now''' to resolve the issue and report compatibility correctly.
 
</div>
 
 
 
== Assert Compatibility of Custom and Third-Party Code ==
 
 
New PHP versions often introduce changes or remove [https://secure.php.net/manual/en/migration70.deprecated.php deprecated functions]. These changes can cause issues like runtime errors in older code.
 
 
* Manually verify this in any code that you wrote or customized.
 
* 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.
 
 
See PHP's documentation for more information about changes in each PHP version:
 
 
* [https://www.php.net/manual/en/migration70.php PHP 7.0]
 
* [http://php.net/manual/en/migration71.php PHP 7.1]
 
* [http://php.net/manual/en/migration72.php PHP 7.2]
 
* [https://www.php.net/manual/en/migration73.php 7.3]
 
* [https://www.php.net/manual/en/migration74.php 7.4]
 
* [https://www.php.net/manual/en/migration80.php 8.0] <div class="docs-alert-warning">WHMCS does not support PHP 8.0. However, changes for PHP 8.0 may impact your updates to custom and third-party code.</div>
 
* [https://www.php.net/manual/en/migration81.php 8.1]
 
 
== Upgrade PHP ==
 
 
Before you upgrade PHP, make '''certain''' that:
 
 
* You have the necessary ionCube Loader version for your target PHP version.
 
* You are running [[PHP_Version_Support_Matrix|a version of WHMCS that supports your target PHP version]].
 
* Any custom or third-party code (and its encoding, if applicable) is compatible with your target PHP version.
 
 
Then, proceed to upgrade the PHP version your site is running:
 
 
* If you run cPanel & WHM and EasyApache 4, you can change your website's PHP version using '''[https://docs.cpanel.net/cpanel/software/multiphp-manager-for-cpanel/ MultiPHP Manager]''' in your cPanel control panel.
 
* For other control panels or systems, consult the vendor's documentation.
 
 
 
== Update Configurations ==
 
 
 
After upgrading PHP, you will need to update your configuration to reflect the change. Make certain that you update your cron configuration and the cron <tt>php.ini</tt> file.
 
 
== Errors ==
 
 
If you experience any of the following error conditions when visiting a URL in WHMCS, there may be compatibility issues with your new PHP version:
 
 
* A 500 internal server error
 
* A blank page
 
* An oops error page
 
 
For help, see [[PHP 7 Migration Troubleshooting Guide]]. For an immediate solution, revert to the previous PHP version should allow you to regain access to the WHMCS system.
 
 
''Last Updated: September 2022''
 

Latest revision as of 17:54, 23 November 2022

Redirect to: