Troubleshooting Ioncube Errors
To help protect the WHMCS software code we obfuscate it using a system called Ioncube. Sometimes a misconfiguration in the Ioncube loaders can cause errors. This guide explains how to resolve some of the most common Ioncube related errors.
An "Ioncube Required" error is caused by a configuration problem with the Ioncube loaders on your server. They might be outdated or missing entirely.
1. Contact your server admin/hosting provider to ensure that the appropriate version of the Ioncube loaders is installed per the System Requirements.
2. Connect to your server's Command Line Interface (SSH) as the same user under which cron jobs run:
3. Execute the command:
Below is the expected output:
- If the "with the ionCube PHP Loader" line is absent, this indicates that the Ioncube loaders are not available for this user.
- If the "with the ionCube PHP Loader" line reports an old version of the Ioncube loaders, this indicates the system requirements are not met.
4. Please work with your hosting provider or server administrator to ensure that the required version of the Ioncube loaders are installed and available to the cron job user.
Caveat for Shared and Reseller Hosted Customers
Some hosting providers do not always use the same PHP configuration for crons as for web applications. To use a version which meet the WHMCS system requirements it can be necessary to specify the PHP binary in the cron command. For example:
/opt/php56/bin/php -q /home/username/public_html/whmcs/crons/cron.php
Replace /home/username/public_html/whmcs/ with the actual path of your WHMCS installation.
A PHP version encoding error is caused by outdated files designed for a previous version of the WHMCS software (pre-7.0).
1. It will typically manifest as a blank or partially formatted page. So begin by enabling the Display Errors option.
2. Reload the page and you'll see something similar to:
Fatal error: The file /home/username/public_html/whmcs/modules/gateways/ewayuk.php was encoded by the ionCube Encoder for PHP 5.3 and cannot run under PHP 7.0. Please ask the provider of the script to provide a version encoded with the ionCube Encoder for PHP 5.6. in Unknown on line 0
N.B. The path and filename will vary.
3. Connect to the server with your preferred FTP client.
4. Navigate to the file mentioned in the error message. In this example /public_html/whmcs/modules/gateways/
5. Remove the file from the error message. In this example ewayuk.php
6. Reload the page again.
7. You may encounter the same error relating to a different file, repeat the process for each file until the page loads correctly.