How to install IonCube Loaders on Ubuntu 14.04

IonCube lets you protect your website’s PHP code from being viewed and ran on unlicensed computers. IonCube Loaders is an encryption/decryption utility for PHP applications which also assists in speeding up the pages that are served. Using ionCube, encoded and secured PHP files require a file called ionCube Loader to be installed on the web server and made available to PHP. IonCube Loader is often required for a lot of PHP-based applications; it handles the reading and execution of encoded files at runtime. PHP can use the loader with one line added to a PHP configuration file `php.ini`.

In this article, I will setup the installation of Ioncube Loader on Ubuntu 14.04 LTS, so that it can be used in all PHP Modes. The only requirement for this tutorial is to have php.ini file exist in your system with LEMP stack installed.

Downloading IonCube

Let’s download the latest IonCube loader package by issuing the following `wget` command with super user privileges or root user according to your operating system architecture, we are using the 64-bit OS.

Testing IonCube Loader

To test the ioncube loader in the PHP configuration for your website, create a test file called `info.php` with the following content and place it into the web directory of your web server.

root@ubuntu-14:~# vim /usr/share/nginx/html/info.php<?phpphpinfo();?>

Then save the changes and access `info.php` in your browser with your domain name or server’s IP address after reloading the web server services.

You will be able to see the section below at the bottom of your php modules information.

From the terminal, issue the following command to verify the php version that shows the ionCube PHP Loader Enabled.

root@ubuntu-14:~# php5 -v

Conclusion

At the end of this tutorial you learned about the installation and configuration of ionCube Loader on Ubuntu with Nginx web server. There will be no difference if you are using any other web server. Installing Loaders is easy when done correctly, and on most servers its installation will work without a problem. However, there is no such thing as a “standard PHP installation”, and servers can be setup in many different ways, and with different features enabled or disabled.

If you are on a shared server, make sure that you run the ioncube-loader-helper.php script, and click the link to test runtime installation. If you still face an issue while doing your setup, feel free to contact us and leave us a comment.