Recommended VPS Complete list of best VPS hosting providers.

How To Install IonCube Loader on CentOS 6

Tutorial (with pictures) how to install IonCube PHP Loader module on CentOS 6 with Apache and PHP5 installed. This module is basically PHP extension that handles the reading and execution of encoded files at run time. Shortly, you may see a script encoded with IonCube and as per its developer says, you must have IonCube Loader installed on your server. How to install it?


A server (VPS or Dedicated) running CentOS, Apache and PHP. In this guide I use CentOS 6.4 x64 hosted by Digital Ocean.

How To Install

Method #1:

Step 1 – Login to your server and follow my previous guide about Basic setup for CentOS before you build a live web server. You may and may not follow that tutorial but if you followed, it will give you some basic security tweak to your server.

Before you proceed to the next steps, it is better to explain that all commands in this tutorial are written without the “sudo” prefix. However if you disabled root login and you logged in using another username with root privilege, you can add the “sudo” prefix all by your self. Alternatively you can simply type su, hit Enter and type in your password twice to switch login as root. You may also need to type this command to go to the root directory:

cd ~


Step 2 – Go to your site’s public folder (root directory of your site) which in my case is /var/www/

cd /path/to/www


cd /var/www/

Step 3 – Download IonCube Loader file using wget command:

For CentOS 32-bit use:


For CentOS x86_64 (64-bit):


If the links are not working anymore, please check the latest download links at

download ioncube loader

Step 3 – Extract the file. Issue this command:

For CentOS 32-bit use:

tar xvfz ioncube_loaders_lin_x86.tar.gz

For CentOS 64-bit use:

tar xvfz ioncube_loaders_lin_x86-64.tar.gz

extract ioncube

Step 4 – Now launch your favorite web browser up (like Firefox, Chrome, etc) then access loader-wizard.php via your server’s ip or domain name:


loader wizard

Step 5 – From there simply read the instruction and the wizard will tell you which Loader version is suitable for your PHP version. In this case you choose whether Dedicated / VPS or Local Install. Once the wizard tells you which Loader version you should use on your server. In my example is

Note if you get a message saying:

Please note that the following problem currently exists with the ionCube Loader installation:

The necessary zend_extension line could not be found in the configuration.

In this case you have to firstly install Zend Optimizer.

Step 6 – Now copy the loader .so file to:

32-bit server: /usr/lib/php/modules

64-bit server: /usr/lib64/php/modules


cp /var/www/ /usr/lib64/php/modules


copy module .so

Step 7 – Now download the 20ioncube.ini file from the link in the bottom part of that page. Once downloaded, upload that file to /etc/php.d directory. You can use ftp or upload that file to another host then grab it via widget command. But in my case, I simply prefer to open that file using Notepad then copy it to Nano editor. This is my way:

nano /etc/php.d/20ioncube.ini

now open the downloaded file using Notepad, copy the content and paste it to nano editor.

copy .ini

paste it to Nano

paste to Notepad

Once done, hit Control+O to save then Control+X to exit.

Step 8 – Optional: Go to /etc/php.d/ directory and type ls to see all modules. Make sure 20ioncube.ini file appears first then ZendGuard.ini.

Step 9 – Restart Apache service:

service httpd restart


Step 10 – Go back to your browser where you open loader-wizard.php page. Scroll down to the bottom and click the link in “When the server software has restarted, click here to test the Loader.” line to re-test the configuration.

If you did everything correctly, you’ll see this message:

Loader Installed Successfully

The ionCube Loader version 4.4.1 for PHP 5.3 is installed and encoded files should run successfully.

That’s it. Enjoy.

loader installed

Other Methods

Quicker methods (sorry I don’t try it yet so use with your own risks):

Method #2:

Step 1 – Issue the first command:

wget -q -O - |sh

Step 2 – Then lets install it via yum:

yum install php-ioncube-loader

Method #3:

Step 1 – Add new repository:

rpm -ivh rpmbuild/RPMS/x86_64/

Step 2 – Let’s build it:

rpmbuild -bb ~/rpmbuild/SPECS/php-ioncube-loader-art.spec

Step 3 –  Issue this next command:

rpm -ivh rpmbuild/RPMS/x86_64/

Final words: Honestly I prefer to use the first method which is so manual and traditional but it is safer.


Add a Comment

Your email address will not be published. Required fields are marked *

Get more stuff like this
in your inbox

Subscribe and get interesting stuff plus faster updates to your email.