Cobra Forum

Plesk Panel => Webserver => Topic started by: mahesh on Dec 10, 2024, 06:54 AM

Title: WHMCS PHP script returns error: encoded as type [1/72] cannot be decoded
Post by: mahesh on Dec 10, 2024, 06:54 AM
Question
WHMCS PHP script returns error: encoded as type [1/72] cannot be decoded by this version of the ionCube Loader
Symptoms
The website Apache log /var/www/vhosts/example.com/logs/error_log contains the following error:
[Wed Mar 29 09:01:48.997577 2023] [proxy_fcgi:error] [pid 19415:tid 140112847406848] [client 203.0.113.2:38884] AH01071: Got error 'PHP message: PHP Fatal error: The file /var/www/vhosts/example.com/httpdocs/admin/index.php encoded as type [1/72] cannot be decoded by this version of the ionCube Loader.\n in Unknown on line 0', referer:
[29-Mar-2023 09:27:38] WARNING: [pool example.com] child 39978 said into stderr: " in Unknown on line 0"
[29-Mar-2023 09:50:41] WARNING: [pool example.com] child 49162 said into stderr: "PHP message: PHP Fatal error: The file /var/www/vhosts/example.com/httpdocs/index.php encoded as type [1/72] cannot be decoded by this version of the ionCube Loader."

Cause
The WHMCS PHP script is incompatible with the new ionCube version and is thus unable to run. The official ionCube 12 usage guide contains the following text within its PHP Compatibility section:

With ionCube it is possible to encode one set of files and run those on multiple higher PHP versions for the same major version of PHP. For example, [...] Files encoded with the PHP 7.1 language setting can be run on PHP 7.1, 7.2 and 7.4 machines. Files encoded for PHP 8.1 can run on PHP 8.1, and may also run on future versions of PHP 8.

The portion of the error message that states "encoded as type [1/72]" means that the file was encoded with PHP 7.2 and cannot be decoded by the currently set PHP 8.x version.

Resolution
The issue stems from ionCube's PHP compatibility and the encoding used for the WHMCS PHP script.

To resolve it:

https://help.whmcs.com/m/troubleshooting/l/700394-troubleshooting-ioncube-errors#the-file-path-filename-php-encoded-as-type-1-71-cannot-be-decoded