How to Install PHP IonCube Loader in CentOS and Ubuntu

Posted on April 16th, 2017

IonCube loader is used for decoding encrypted PHP files. It is freely available and very easy to install. It handles both reading and execution of encoded files at run time. It also helps to speed up the websites.


Steps to install IonCube loader

1) First you need to install wget command for downloading applications. Wget is default on some servers.

 In CentOS:

# yum install wget

 In Ubuntu

# apt-get install wget


2) Download latest IonCube loader from IonCube download page.

 For 32-bit system:

# wget

 For 64-bit system:

# wget


3) Extract the code in /tmp folder.

# tar -xfz ioncube_loaders_lin_x86-64.tar,.gz -C /tmp


4) Check the version of PHP which is currently installed on server using the below command.

# php -v

ea-php-cli Copyright 2016 cPanel, Inc.

PHP 5.6.4 (cgi-fcgi) (built: Jun 25 2012 04:38:39)

Copyright (c) 1997-2010 The PHP Group

Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


5) Locate the extension directory of the installed PHP version using the command below and copy IonCube loader to the extension directory.

# php -i | grep extension_dir

extension_dir => /usr/lib/php5/20131226 => /usr/lib/php5/20131226

sqlite3.extension_dir => no value => no value

# cp /tmp/ioncube/  /usr/lib/php5/20131226/


6) Configure IonCube Loader in server.

 For centos:

You can find the installed php main configuration file from the following command.

# php –ini

Then open the configuration file and add the extension for IonCube loader in the bottom of the file.

# vi /etc/php.ini

zend_extension = /usr/lib/php5/20131226/

 For Ubuntu:

Locate php configuration file using the following command.

# php –ini

Ubuntu uses different php configuration files for PHP CLI, CGI, Apache and FPM. The files paths are specified below:

Apache mod_php


Command line PHP (CLI)


PHP CGI (used for CGI and Fast_CGI modes)




Now simply open the PHP configuration file and add the extension to the line below.

# vi /etc/php/5.6/apache/php.ini

zend_extension = /usr/lib/php5/20131226/


7) Restart apache web server

For centos:

# systemctl restart httpd

 For ubuntu:

# service apache2 restart


8) Verify the IonCube Loader by following command.

# php -m


Also, you can verify the same from the php info page.


If you need any further help please contact our support department.



Leave a Reply