Introduction


IonCube encrypts and protects PHP files. In order to load the encrypted files, the Ioncube Loader is needed. This way, web applications are improved in performance and security.

It is often required for a lot of PHP-based applications.

In this guide we will show you how to install the IonCube Loader on Ubuntu 32-bit dedicated or VPS server.

Download and Extract IonCube Loader


IonCube loader PHP modules can be downloaded and extracted by typing the following commands:

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
tar xvfz ioncube_loaders_lin_x86.tar.gz

Copy IonCube to PHP modules folder


Now we have to copy the appropriate IonCube module to the PHP modules folder. In order to find the correct forlder's location, type the following command

php -i | grep extension_dir

You will get an output like this:

extension_dir => /usr/lib/php5/50450624+lfs => /usr/lib/php5/50450624+lfs

Now you have to copy the module to your PHP modules folder:

PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
sudo cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" /usr/lib/php5/50450624+lfs/

Now that the file is in place you have to restart Apache2 or php5-fpm (if you're using nginx) for the module to be loaded:

service apache2 restart
service php5-fpm restart

In order to make sure that the module was correctly installed, create a file called test.php in /var/www with the following content:

<?php
echo var_export(extension_loaded('ionCube Loader') ,true);

Once you are done with the file, navigate to http://SERVER-IP-ADDRESS/test.php. You should get a true as response.

IonCube installation on 64 bit systems

If you are working on a 64 bit Operating System with LAMP stack on your dedicated or VPS server, you will need to download the a 64 bit version of the package:

wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xvfz ioncube_loaders_lin_x86-64.tar.gz

The rest of the installation is the same as explained above for the 32 bit version.

That's it there is to it!

 

Test on a Miami VPS Now

or

Deploy on a Miami Dedicated Server

Was this answer helpful? 3 Users Found This Useful (8 Votes)