ionCube is a PHP module that protects the PHP application's source code from being viewed from an unlicensed computer. Also, it is used to run the encoded files; therefore, most applications and software use it for security purposes.
Following are the steps to install the ionCube Loader manually on your server CentOS 7.0.
1. Log in to your server via SSH.
# ssh root@IP_Address
2. Run this command to check the system version.
# arch
3. If your system version is 64-bit, you will need to install ionCube Loader with 64-bit.
# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
4. The following link is for the 32-bit system version –
# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
5. Extract the tar.gz with this command.
# tar xfz ioncube_loaders_lin_x86-64.tar.gz
6. Check your PHP version with the following command and find the suitable ionCube loader version.
# php -v
PHP 7.0.32 (cli) (built: Sep 13 2018 16:50:42) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
7. Here, the PHP version is 7.0, so we will install the Ioncube_loader_lin_7.0.so, but you can choose the ionCube version according to your PHP version.
# ls ioncube
ioncube_loader_lin_4.1.so ioncube_loader_lin_4.4.so ioncube_loader_lin_5.1.so ioncube_loader_lin_5.3.so ioncube_loader_lin_5.5.so LICENSE.txt
ioncube_loader_lin_4.2.so ioncube_loader_lin_4.4_ts.so ioncube_loader_lin_5.1_ts.so ioncube_loader_lin_5.3_ts.so ioncube_loader_lin_5.5_ts.so loader-wizard.php
ioncube_loader_lin_4.3.so ioncube_loader_lin_5.0.so ioncube_loader_lin_5.2.so ioncube_loader_lin_5.4.so ioncube_loader_lin_5.6.so README.txt
ioncube_loader_lin_4.3_ts.so ioncube_loader_lin_5.0_ts.so ioncube_loader_lin_5.2_ts.so ioncube_loader_lin_5.4_ts.so ioncube_loader_lin_5.6_ts.so USER-GUIDE.pdf
8. Find the PHP extension directory location.
# php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
sqlite3.extension_dir => no value => no value
9. Copy the ioncube.so to the PHP extension directory.
cp ioncube/ioncube_loader_lin_7.0.so /usr/lib64/php/modules
10. Add the following line to your php.ini file –
# vi /etc/php.ini
zend_extension = /usr/lib64/php/module/ioncube_loader_lin_7.0.so
11. The php.ini file path may be different on your server.
If you have cPanel installed, you can check the path by adding the phpinfo file.
12. Save the php.ini file and verify the ionCube on your PHP, and it should give you the following result –
# php -v
PHP 7.0.32 (cli) (built: Sep 13 2018 16:50:42) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.2.7, Copyright (c) 2002-2018, by ionCube Ltd.
with Zend OPcache v7.0.32, Copyright (c) 1999-2017, by Zend Technologies
This is how you can install the ionCube on the CentOS server.