ionCube is an application tool for PHP Encoder, which protects and encrypts the source code or PHP program code. While ionCube Loader is a PHP extension for ionCube so that the encrypted PHP program code can be run on the server (decrypted).
*0.Install Apache and PHP*
Update Ubuntu first
[INPUT]1 apt update; apt upgrade -y
Install Apache and PHP
[INPUT]1 apt install apache2 php php-fpm php-common libapache2-mod-php -y
*1.Install ionCube Loader*
Download ionCube Loader and extract
[INPUT]1 2 wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xzvf ioncube_loaders_lin_x86-64.tar.gz
Check the version of PHP that runs on Ubuntu
[INPUT]1 php -v
The result is that PHP 7.2 means that what is needed is ionCube Loader for PHP 7.2
[INPUT]1 2 3 4 PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies
Check the location of the extension folder
[INPUT]1 php -i | grep extension_dir
The result is /usr/lib/php/20170718
[INPUT]1 extension_dir => /usr/lib/php/20170718 => /usr/lib/php/20170718
Check the contents of the extracted folder, see what the file name is IonCube Loader for PHP 7.2
[INPUT]1 ls -l ioncube
Copy ionCube Loader to the extension folder
[INPUT]1 cp ioncube/ioncube_loader_lin_7.2.so /usr/lib/php/20170718/
Enter the ionCube Loader extension into the PHP configuration (php.ini). There are 3 php.ini files, in the apache2 folder when using the Apache web server, in the fpm folder if using PHP-FPM it is usually associated with the Nginx web server, and in the cli folder for php-cli (command line interface).
[INPUT]1 2 3 nano /etc/php/7.2/apache2/php.ini nano /etc/php/7.2/fpm/php.ini nano /etc/php/7.2/cli/php.ini
Add the following options to the last line of the php.ini file.
[INPUT]1 zend_extension = /usr/lib/php/20170718/ioncube_loader_lin_7.2.so
Restart apache2 if using the Apache web server and php7.2-fpm if using PHP-FPM.
[INPUT]1 2 systemctl restart apache2 systemctl restart php7.2-fpm
*2.Testing*
Run the command check the PHP version, make sure you have put the ionCube Loader extension into php.ini for cli.
[INPUT]1 php -v
The result is an additional with the ionCube PHP Loader
[INPUT]1 2 3 4 5 PHP 7.2.24-0ubuntu0.18.04.3 (cli) (built: Feb 11 2020 15:55:52) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd. with Zend OPcache v7.2.24-0ubuntu0.18.04.3, Copyright (c) 1999-2018, by Zend Technologies
Subsequent tests created the info.php file.
[INPUT]1 nano /var/www/html/info.php
Fill with
[INPUT]1
Then browse http://IP_SERVER/info.php and search for ioncube
PHP Information – ionCube Loader
Good luck ð