How to Install IonCube on CentOS 7

r00t April 4, 2018

Install IonCube on CentOS 7

In this tutorial we’ll learn how to install IonCube on CentOS 7. We will also install and configure its prerequisites. IonCube is a PHP encoder which is being used to convert readable source code written in PHP in bytecode making it unreadable to other users. It boosts the security and rate of scripts written in PHP. To have the ability to conduct ionCube encoded and secured PHP scripts, then you need to have ionCube Loader installed on your Linux server.

I recommend to use a minimal CentOS server setup as a basis for the tutorial, that can be a virtual or a root server image with an CentOS 7 minimal install from a web hosting company or you use our minimal server tutorial to install a server from scratch.

Install IonCube on CentOS 7

Step 1. First, ensure your system and apt package lists are fully up-to-date by running the following:

yum -y install epel-release
yum -y update

Step 2. Installing LAMP server.

A CentOS 7 LAMP server is required. If you do not have LAMP installed, you can follow our guide here. We need to know the PHP version installed on the server. We can find out using the following command:

# php -v
PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Step 3. Installing IonCube Loaders.

First, Download and extract the latest stable version IonCube:

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

### 32-Bit ###
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xfz ioncube_loaders_lin_x86.tar.gz

Next we need to locate where PHP is loading extensions, this can be done by running the below command and looking:

### php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules

Open the extracted ioncube folder and copy the ioncube loader file match to your php version:

cd ioncube
cp ioncube/ioncube_loader_lin_5.4.so /usr/lib64/php/modules

Now, open the PHP configuration file and add the following line:

### nano /etc/php.ini
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so

Save the configuration file and restart the Apache web server for the changes to take effect:

systemctl restart httpd

That should be all, with this step IonCube Loader is successfully installed on your Ubuntu server. You can test this by executing ‘php -v’:

PHP 5.4.16 (cli) (built: Aug 11 2016 21:24:59)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.1.2, Copyright (c) 2002-2016, by ionCube Ltd.

Congratulation’s! You have successfully install IonCube on your CentOS 7 server. Thanks for using this tutorial for installing IonCube Loader on CentOS 7 system.

The Tags:

Leave a Comment

Comments are closed.