HostOnNet Blog

Installing ioncube in Ubuntu

Looking for Linux Server Admin or WordPress Expert? We can help.

Download ioncube

cd ~/Downloads
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar zxvf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube

Find extension_dir folder

php -i | grep extension_dir will give location of extension_dir in your installation. You need to copy correct version of ioncube file to this folder.

$ php -i | grep extension_dir
extension_dir => /usr/lib/php5/20121212 => /usr/lib/php5/20121212
$ 

Find PHP Version

Lets find the PHP version, so we know which ioncube file to use.

$ php -v
PHP 5.5.9-1ubuntu4.9 (cli) (built: Apr 17 2015 11:44:57) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
$

Copying ioncube .so file to PHP extension_dir

ioncube provid following .so files, you need to copy the file for your PHP version to extension_dir folder.

$ ls -la
total 19404
drwxr-xr-x  2 boby boby    4096 May 22 21:30 .
drwxr-xr-x 28 boby boby   12288 Jun  9 14:38 ..
-rwxr-xr-x  1 boby boby  464360 May 22 20:06 ioncube_loader_lin_4.1.so
-rwxr-xr-x  1 boby boby  463912 May 22 20:07 ioncube_loader_lin_4.2.so
-rwxr-xr-x  1 boby boby  464616 May 22 20:07 ioncube_loader_lin_4.3.so
-rwxr-xr-x  1 boby boby  482248 May 22 20:07 ioncube_loader_lin_4.3_ts.so
-rwxr-xr-x  1 boby boby  467624 May 22 20:07 ioncube_loader_lin_4.4.so
-rwxr-xr-x  1 boby boby  483368 May 22 20:07 ioncube_loader_lin_4.4_ts.so
-rwxr-xr-x  1 boby boby  476616 May 22 20:08 ioncube_loader_lin_5.0.so
-rwxr-xr-x  1 boby boby  489736 May 22 20:08 ioncube_loader_lin_5.0_ts.so
-rwxr-xr-x  1 boby boby 1097448 May 22 20:08 ioncube_loader_lin_5.1.so
-rwxr-xr-x  1 boby boby 1137128 May 22 20:09 ioncube_loader_lin_5.1_ts.so
-rwxr-xr-x  1 boby boby 1138472 May 22 20:09 ioncube_loader_lin_5.2.so
-rwxr-xr-x  1 boby boby 1175592 May 22 20:09 ioncube_loader_lin_5.2_ts.so
-rwxr-xr-x  1 boby boby 1273808 May 22 20:10 ioncube_loader_lin_5.3.so
-rwxr-xr-x  1 boby boby 1330896 May 22 20:10 ioncube_loader_lin_5.3_ts.so
-rwxr-xr-x  1 boby boby 1414416 May 22 20:11 ioncube_loader_lin_5.4.so
-rwxr-xr-x  1 boby boby 1492272 May 22 20:12 ioncube_loader_lin_5.4_ts.so
-rwxr-xr-x  1 boby boby 1429288 May 22 20:12 ioncube_loader_lin_5.5.so
-rwxr-xr-x  1 boby boby 1502856 May 22 20:13 ioncube_loader_lin_5.5_ts.so
-rwxr-xr-x  1 boby boby 1394328 May 22 20:13 ioncube_loader_lin_5.6.so
-rwxr-xr-x  1 boby boby 1447000 May 22 20:14 ioncube_loader_lin_5.6_ts.so
-rw-rw-r--  1 boby boby   10768 Apr 23 21:35 LICENSE.txt
-rw-rw-r--  1 boby boby  162987 Apr 23 21:20 loader-wizard.php
-rw-rw-r--  1 boby boby    2191 Apr 23 21:45 README.txt
-rw-rw-r--  1 boby boby    5445 Apr 27 23:20 USER-GUIDE.txt
$ 

We have PHP 5.5 installed. Lets use following file ioncube_loader_lin_5.5.so

sudo cp ioncube_loader_lin_5.5.so /usr/lib/php5/20121212

Load ioncube module

Create file /etc/php5/apache2/conf.d/01-ioncube.ini

sudo vi /etc/php5/apache2/conf.d/01-ioncube.ini

Add following content to the file you created.

zend_extension=ioncube_loader_lin_5.5.so

Restart Apache

sudo service apache2 restart

ionCube for Commmand Line PHP

cd /etc/php5/cli/conf.d/
ln -s /etc/php5/apache2/conf.d/01-ioncube.ini

Verify it with

root@manage:~# php -m | grep -i ionc
ionCube Loader
the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured)
root@manage:~# 

Posted in Ubuntu

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.