How to Upgrade ionCube Loader on WHM/cPanel

WHM

WHM allows you to switch to a specific version of ionCube Loader from EasyApache4. But it may not have the latest version of ionCube Loader. You may need to upgrade to the latest ionCube Loader on WHM/cPanel for your website to work. In that case, you will have to manually download and install the latest version of ionCube Loader on WHM.

Finding the Installed ionCube Loader Version on WHM

To find the version of ionCube Loader already installed on WHM, run the following command:

php -i | grep -i ioncube

As you can see, I have ionCube Loader version 13.0.2 installed on my WHM server. But I need at least version 14 for my Lagom theme to work.

Downloading the Latest Version of ionCube Loader

You can find the download link to the latest version of the ionCube Loader on the official ionCube Loader website.

Once you copy the download link, open the Terminal section of WHM and run the following command to download the latest version of ionCube Loader:

wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.zip

Once the file is downloaded, extract it with the following command:

unzip ioncube_loaders_lin_x86-64.zip

Once the file is extracted, you will find an ioncube directory, and in the directory, you will find the ionCube Loader library/extension file for different PHP versions. You will have to install the correct ones on your WHM server.

ls -lh ioncube/

Installing the Latest Version of ionCube Loader

To install the latest version of ionCube Loader, you will have to copy the correct ionCube Loader files that match the PHP version you have installed on WHM.

To check the default PHP version of WHM, run the following command:

php -version

As you can see, on my WHM server, PHP 8.1.32 is the default.

You can find the PHP extension directory where you need to copy the ionCube Loader files with the command below.

php -i | grep extension_dir

As you can see, the PHP extension directory of PHP 8.1.32 on my WHM installation is /opt/cpanel/ea-php81/root/usr/lib64/php/modules.

Copy the ionCube Loader files for PHP 8.1 (ioncube_loader_lin_8.1.so and ioncube_loader_lin_8.1_ts.so) to the PHP 8.1 extension directory of WHM with the following commands:

cp -v ioncube/ioncube_loader_lin_8.1.so /opt/cpanel/ea-php81/root/usr/lib64/php/modules/
cp -v ioncube/ioncube_loader_lin_8.1_ts.so /opt/cpanel/ea-php81/root/usr/lib64/php/modules/

The latest version of ionCube Loader should be installed.

Restarting the Apache and PHP-FPM Services

For the changes to take effect, restart the Apache Web Server and PHP-FPM service for Apache from WHM.

Leave a Reply

Your email address will not be published. Required fields are marked *