Difference between revisions of "PHP 7 Migration Troubleshooting Guide"
Line 1: | Line 1: | ||
− | [[PHP 7 Migration Guide| | + | If, [[PHP 7 Migration Guide|after changing your PHP version]], you encounter an '''Oops''' error or a blank or partially-rendered page, it is likely that there is a file in your installation that is not compatible with the new PHP version. |
− | |||
− | |||
This may indicate one of these problems: | This may indicate one of these problems: | ||
Line 14: | Line 12: | ||
===Enabling From The Admin Area=== | ===Enabling From The Admin Area=== | ||
− | If | + | If possible, log in to the [[Admin Area]] and perform the following steps to enable error display: |
− | # Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > General Settings''' or, prior to WHMCS 8.0, '''Setup > General Settings'''. | + | # Go to '''Configuration (<i class="fa fa-wrench" aria-hidden="true"></i>) > System Settings > [[General Settings]]''' or, prior to WHMCS 8.0, '''Setup > General Settings'''. |
− | # Select the '''Other''' tab. | + | # Select the '''[[Other Tab|Other]]''' tab. |
# Check '''Display Errors'''. | # Check '''Display Errors'''. | ||
# Click '''Save Changes'''. | # Click '''Save Changes'''. | ||
Line 27: | Line 25: | ||
If you cannot log in, use these steps to enable error reporting in the configuration file directly: | If you cannot log in, use these steps to enable error reporting in the configuration file directly: | ||
− | # In the WHMCS root directory, | + | # In the WHMCS root directory, open the <tt>configuration.php</tt> file for editing. |
− | # Add | + | # Add the following line at the end of the configuration file, below any other lines but above the closing <tt>?></tt> line, if it is present:<div class="source-cli">$display_errors = true;</div> |
After error reporting is enabled, retry the steps that previously led to the '''Oops!''', blank, or partially rendered page. More information will display. | After error reporting is enabled, retry the steps that previously led to the '''Oops!''', blank, or partially rendered page. More information will display. | ||
Line 34: | Line 32: | ||
==Common Errors/Resolutions== | ==Common Errors/Resolutions== | ||
− | + | After you enable error reporting, you will see the full error message that WHMCS generates when the problem occurs: | |
===Oops! Something went wrong and we couldn't process your request=== | ===Oops! Something went wrong and we couldn't process your request=== | ||
Line 40: | Line 38: | ||
[[File:Oops_error_page.png]] | [[File:Oops_error_page.png]] | ||
− | This indicates that a fatal error is occurring. Usually, this is due to | + | This error indicates that a fatal error is occurring. Usually, this is due to one of two causes: |
− | * '''Missing PHP Extensions''' — | + | * '''Missing PHP Extensions''' — Your version of PHP is missing some of the [[System_Environment_Guide#Extensions_2|required extensions]] for WHMCS.<div class="docs-alert-warning">If you compile PHP using EasyApache, you must include both the '''PDO''' and '''mysqlnd''' PHP extensions to allow MySQL® connections.</div> |
− | * '''Incompatible PHP Files''' — PHP files using deprecated or unavailable functions | + | * '''Incompatible PHP Files''' — PHP files using deprecated or unavailable functions are triggering an error page. To debug this, enable error reporting to find the file and PHP error output. |
===The file was encoded by the ionCube Encoder for PHP x.x and cannot run...=== | ===The file was encoded by the ionCube Encoder for PHP x.x and cannot run...=== | ||
Line 51: | Line 49: | ||
The file /path/to/file.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. | The file /path/to/file.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1. | ||
− | + | This error indicates that the file encoding uses an older version of ionCube Encoder® that does not support PHP 7.1 or later. Contact the original author of the file for an updated version. | |
If the file is a WHMCS file, we may no longer maintain or distribute it. | If the file is a WHMCS file, we may no longer maintain or distribute it. | ||
− | * | + | |
+ | * To identify WHMCS files, check for the WHMCS copyright notice at the beginning of the file. | ||
* Typically, built-in routine updates remove these files automatically. However, permissions issues may prevent removal. | * Typically, built-in routine updates remove these files automatically. However, permissions issues may prevent removal. | ||
− | * Normally, | + | * Normally, the current version of WHMCS does not use these files and you can delete them. |
− | |||
− |
Revision as of 19:12, 27 April 2022
If, after changing your PHP version, you encounter an Oops error or a blank or partially-rendered page, it is likely that there is a file in your installation that is not compatible with the new PHP version.
This may indicate one of these problems:
- Syntax Error — A file uses deprecated or removed functionality that is no longer available in the newer version of PHP.
- Decoding — A file is encoded with an ionCube® encoding that is not compatible with the newer version of PHP or the installed ionCube Loader® extension.
To confirm the exact cause of the issue, you must enable error reporting.
Contents
Enabling Error Reporting
Enabling From The Admin Area
If possible, log in to the Admin Area and perform the following steps to enable error display:
- Go to Configuration () > System Settings > General Settings or, prior to WHMCS 8.0, Setup > General Settings.
- Select the Other tab.
- Check Display Errors.
- Click Save Changes.
After error reporting is enabled, retry the steps that previously led to the Oops!, blank, or partially rendered page. More information will display.
Enabling From Your Configuration File
If you cannot log in, use these steps to enable error reporting in the configuration file directly:
- In the WHMCS root directory, open the configuration.php file for editing.
- Add the following line at the end of the configuration file, below any other lines but above the closing ?> line, if it is present:$display_errors = true;
After error reporting is enabled, retry the steps that previously led to the Oops!, blank, or partially rendered page. More information will display.
Common Errors/Resolutions
After you enable error reporting, you will see the full error message that WHMCS generates when the problem occurs:
Oops! Something went wrong and we couldn't process your request
This error indicates that a fatal error is occurring. Usually, this is due to one of two causes:
- Missing PHP Extensions — Your version of PHP is missing some of the required extensions for WHMCS.If you compile PHP using EasyApache, you must include both the PDO and mysqlnd PHP extensions to allow MySQL® connections.
- Incompatible PHP Files — PHP files using deprecated or unavailable functions are triggering an error page. To debug this, enable error reporting to find the file and PHP error output.
The file was encoded by the ionCube Encoder for PHP x.x and cannot run...
You may see an error message that looks like this:
The file /path/to/file.php was encoded by the ionCube Encoder for PHP 5.6 and cannot run under PHP 7.1 or later. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 7.1.
This error indicates that the file encoding uses an older version of ionCube Encoder® that does not support PHP 7.1 or later. Contact the original author of the file for an updated version.
If the file is a WHMCS file, we may no longer maintain or distribute it.
- To identify WHMCS files, check for the WHMCS copyright notice at the beginning of the file.
- Typically, built-in routine updates remove these files automatically. However, permissions issues may prevent removal.
- Normally, the current version of WHMCS does not use these files and you can delete them.