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:
Generate your SSH Key:
Add your SSH Key to GridPane:
Connect to your server:
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/ioncube_loader_lin_7.x.so' | tee -a /etc/php/7.x/cli/php.ini && echo 'zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.x.so' | 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/ioncube_loader_lin_7.3.so' | tee -a /etc/php/7.3/cli/php.ini && echo 'zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so' | 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/ioncube_loader_lin_7.4.so' | tee -a /etc/php/7.4/cli/php.ini && echo 'zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so' | tee -a /etc/php/7.4/fpm/php.ini && gp php 7.4 restart
Step 4. Confirm it’s working
Run the following:
The output should look as follows:
PHP 7.3.27-9+ubuntu18.04.1+deb.sury.org+1 (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 v7.3.27-9+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies