First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Make sure you have already installed php if not then use this command to install php 7.4
sudo apt install -y php7.4


Step 1 – Download Ioncube Loader

First, download the latest PHP modules for ioncube loaders from the ioncube download page. Alternatively, you can use the following command to download ioncube loaders. Also, download the downloaded archive to the / usr / local directory.

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz 

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

Step 2 – Find Correct PHP.ini

For this purpose only, it is important to find the correct PHP configuration file (php.ini) to enable ionCube. The php command provides detailed information about the active version of PHP on the command line interface.

You can grep the php.ini location by running the command:

php -i | grep php.ini

Configuration File (php.ini) Path => /etc/php/7.4/cli
Loaded Configuration File => /etc/php/7.4/cli/php.ini

Step 3 – Configure ionCube Loader in PHP

Now edit the required PHP configuration files or you can update all the above configuration files. Add the code below to the end of the files based on your PHP version.

 

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

Make sure to replace /usr/local/ioncube/ioncube_loader_lin_7.23.so file path with your matching PHP version file.

 

Step 4 – Test Configuration

All done. You have added ionCube settings to your php configuration. Type to confirm the configuration:

php -v PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:22) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with the ionCube PHP Loader + ionCube24 v10.4.1, Copyright (c) 2002-2020, by ionCube Ltd. with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

You will see that ionCube PHP loader has been configured with your PHP version. Similarly, to view configuration for Apache use phpinfo() file.



Was this answer helpful? 26 Users Found This Useful (93 Votes)