
What is IonCube Loader ?
IonCube Loader is a PHP module or extension for PHP files decoding encrypted and is often required for many applications based on PHP. It helps us to protect php applications from unauthorized execution and at the same time can accelerate the website. This article will show you how you can install ioncube loader on CentOS 6 and the steps also works on CentOS 7.
1. Check and verify ioncube version :
# php -v
PHP 5.4.33 (cli) (built: Sep 20 2014 16:20:03)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
Your PHP version must match ioncube version :
eg. PHP 5.5 will use file: ioncube_loader_lin_5.5.so
eg. PHP 5.4 will use file: ioncube_loader_lin_5.4.so
eg. PHP 5.3 will use file: ioncube_loader_lin_5.3.so
In this case, php version is PHP 5.4, and the matching ioncube loader version should be ioncube_loader_lin_5.4.so.
2. Create directory for ioncube :
# mkdir /usr/local/ioncube
3. Download and extract the ioncube:
# wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
# tar xzvf ioncube_loaders_lin_x86-64.tar.gz
4. Open the extracted ioncube folder and copy the ioncube loader file match to your php version. :
# cd ioncube
# cp -p ioncube_loader_lin_5.4.so /usr/local/ioncube
5. Now locate php.ini file. This is how you can find location of php.ini.
# php -i| grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
6. Edit php.ini file and save :
# vim /etc/php.ini
Add the following at the bottom of php.ini :
..
..
zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.4.so
7. Verify the php version, it is now should include file “ioncube_loader_lin_5.4.so” in PHP 5.4 if you get the display as below :
# php -v
PHP 5.4.33 (cli) (built: Sep 20 2014 16:20:03)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
with the ionCube PHP Loader v4.7.5, Copyright (c) 2002-2014, by ionCube Ltd.
If you can see the version of PHP with ionCube loader version, meaning you have successfully installed and configured ioncube PHP loader in your linux system.