In this tutorial we will cover the steps needed to install Ion Cube Loader on your CentOS 6.4, Debian or Ubuntu platform.
CentOS 6.4, Debian or Ubuntu installed on your computer/server
SSH access (Command line access to the server)
root privileges
Basic skills for working on a Linux environment
IonCube is a PHP extension that protects the PHP files from being displayed, edited or executed on a server that does not have the necessary license. The ionCube Loader handles the reading and execution of the encoded files at run time.
Let's download the IonCube loader package inside the Apache web root folder (usually this is /var/www/):
Make sure that the correct package is downaded depending on the server architecture (32-bit or 64-bit): http://www.ioncube.com/loaders.php
Once the file is downloaded and the content extracted we can access the loader wizard script:
where X.X.X.X is your server's IP address, i.e. http://1.2.3.4/ioncube/loader-wizard.php
An easy way to find your server's IP address is to execute the following command:
A brief system check will be performed and after that you will be prompted to chose the type of your server:
Shared
Dedicated or VPS
Local install
Chose the Local install option.
Information about the correct IonCube loader module and exact configuration instructions will be displayed on the next page:
CentOS 6.4:
The correct loader for your system has been found at /var/www/ioncube/ioncube_loader_lin_5.3.so. You may wish to copy the loader from /var/www/ioncube/ioncube_loader_lin_5.3.so to /usr/lib64/php/modules
Debian/Ubuntu:
The correct loader for your system has been found at /var/www/ioncube/ioncube_loader_lin_5.4.so. You may wish to copy the loader from /var/www/ioncube/ioncube_loader_lin_5.4.so to /usr/lib/php5/20100525.
After that we need to place the correct extension path (displayed on the IonCube wizard page) inside a file called 20-ioncube.ini:
CentOS 6.4:
Debian/Ubuntu:
1
1
1
1
1
cd /var/www/ && sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz && sudo tar zxvf ioncube_loaders_lin_x86-64.tar.gz
http://X.X.X.X/ioncube/loader-wizard.php
ip addr show eth0|grep inet|awk '{print $2}'|cut -d / -f1
sudo cp /var/www/ioncube/ioncube_loader_lin_5.3.so /usr/lib64/php/modules/
sudo nano /etc/php.d/20-ioncube.ini
1
2
3
sudo nano /etc/php5/apache2/conf.d/20-ioncube.ini
zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.3.so
Save the file and restart the Apache server in order for the changes to take effect:
CentOS 6.4
Debian/Ubuntu
When ready we can click on the link from the IonCube Wizard page stating “When the server software has restarted, click here to test the Loader.” line to re-test the configuration.”
If everything went well a confirmation page will be displayed inside the browser:
1
1
sudo /etc/init.d/httpd restart
sudo /etc/init.d/apache2 restart
1
2
Loader Installed Successfully
The ionCube Loader version 4.6.1 for PHP 5.3 is installed and encoded files should run successfully.
For security reasons we advise that you remove this Wizard script from your server now that the ionCube Loader is installed.
Now the IonCube wizard script can be removed from the Apache web root folder:
We can test the functionality of the service by creating a test PHP info file inside the Apache web root folder:
containing the following lines:
Save the file and open it using your browser: http://X.X.X.X/test.php
Default PHP information page should be displayed on your end and text similar to the following one should be displayed above the PHP Credits section:
This program makes use of the Zend Scripting Language Engine: Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd.
1
1
1
sudo rm -rf /var/www/ioncube/
sudo nano test.php