How to install Ioncube Loaders

2 min read

Sometimes you might come across plugins or software that is encrypted with Ioncube, and you might need to install the Ioncube loaders into PHP so that the plugin or software works. 

Warning: Ioncube is third party software and isn’t supported by GridPane. Additionally, if it breaks the server, the server won’t be supported.

That being said, this is pretty safe.

Before you get started, make sure you’ve generated an SSH key and have successfully logged into your server as root. The following guides detail how to do this:

Step 1: Download the Ioncube loaders 


Step 2: Extract the Ioncube loaders

tar xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local

Step 3: Load it

Add a line to the end of the PHP config files, adjust 7.x to your version (7.2, 7.3, etc), and restart PHP

echo 'zend_extension = /usr/local/ioncube/' | tee -a /etc/php/7.x/cli/php.ini && echo 'zend_extension = /usr/local/ioncube/' | tee -a /etc/php/7.x/fpm/php.ini && gp php 7.x restart

Right now the current PHP CLI version is 7.3, so you can run the following:

echo 'zend_extension = /usr/local/ioncube/' | tee -a /etc/php/7.3/cli/php.ini && echo 'zend_extension = /usr/local/ioncube/' | tee -a /etc/php/7.3/fpm/php.ini && gp php 7.3 restart

At some point in the future it will be updated to 7.4, so you can also the run the following as well:

echo 'zend_extension = /usr/local/ioncube/' | tee -a /etc/php/7.4/cli/php.ini && echo 'zend_extension = /usr/local/ioncube/' | tee -a /etc/php/7.4/fpm/php.ini && gp php 7.4 restart

Step 4. Confirm it’s working

Run the following:

php -v

The output should look as follows:

PHP (cli) (built: Feb 23 2021 15:10:08) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.27, Copyright (c) 1998-2018 Zend Technologies
with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
with Zend OPcache, Copyright (c) 1999-2018, by Zend Technologies

You’re done!