In this tutorial we will cover the steps needed to install Ion Cube Loader on your CentOS 6.4, Debian or Ubuntu platform.

Requirements

  • 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
  • LAMP installed on the server

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.

Install and configure IonCube Loader

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:

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:

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:

Test the functionality of the service

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.