How to Install PHP IonCube Loader in CentOS and Ubuntu

Last modified: July 30, 2020
You are here:
Estimated reading time: 1 min

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.

http://www.ioncube.com/loaders.php

 For 32-bit system:

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

 For 64-bit system:

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

 

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/ioncube_loader_lin_5.6.so  /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/ioncube_loader_lin_5.6.so

 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

/etc/php5/apache2/php.ini

Command line PHP (CLI)

/etc/php5/cli/php.ini

PHP CGI (used for CGI and Fast_CGI modes)

/etc/php5/cgi/php.ini

PHP FPM

/etc/php5/fpm/php.ini

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/ioncube_loader_lin_5.6.so

 

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.

 

 

Was this article helpful?
Dislike 0
Views: 10