Skip to Content

How to install ioncube on jump server?

 How to install Ioncube on jumpserver or bastion host?


IonCube Loader is typically installed to enable PHP scripts encoded with IonCube to run on a server. These scripts are often proprietary or contain sensitive intellectual property and are encoded to protect them from unauthorized access or modification. By installing IonCube Loader, the server can interpret and execute these encoded scripts, allowing them to function as intended while maintaining their security measures.


NOTEYou would need root access to the server

Step 1: Download the latest Ioncube version from the site mentioned below.

You would need to identify whether your system architecture is 32-bit or 64-bit.

The subsequent command would help you with it.

[root@gateway~]# file /bin/ping

/bin/ping: setuid ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, stripped

 
As evident, the architecture is 64-bit.
Download the Ioncube package designed for 64-bit systems and extract it to /usr/local/ioncube.

[root@gateway~]# wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

[root@gateway~]# tar -zxf ioncube_loaders_lin_x86-64.tar.gz && mv ioncube /usr/local

 
Step 2: Identify the PHP version you're running on your system.

[ root@gateway ~]# php -v

PHP 8.1.26 (cli) (built: Nov 24 2023 08:49:33)

 
Step 3: Edit the PHP configuration file & Add the corresponding Ioncube loader
NOTE:
Load the Iocube version corresponding to your PHP version only.
For example, If you have PHP Version 8.1 , The Ioncube loader should be ioncube_loader_lin_8.1.so
 

For Centos 7

[root@centos7]# vi /etc/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so

[root@centos7]# systemctl restart httpd

Centos 7 Nginx 

[root@centos7]# vi /etc/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so

[root@centos7]# systemctl restart nginx

For Centos 8

[root@centos8]# vi /etc/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so

[root@centos8]# systemctl restart httpd

For RHEL 8

[root@centos8]# vi /etc/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so

[root@centos8]# systemctl restart httpd

For Ubuntu 16

root@gateway :~# vi /etc/php/7.0/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so

 

root@gateway:~# vi /etc/php/7.0/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so

 

root@gateway:~# systemctl restart apache2

For Ubuntu 18

root@gateway :~# vi /etc/php/7.2/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so

 

root@gateway:~# vi /etc/php/7.2/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so

 

root@gateway:~# systemctl restart apache2

For Ubuntu 20

root@gateway :~# vi /etc/php/7.4/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

 

root@gateway:~# vi /etc/php/7.4/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

 

root@gateway:~# systemctl restart apache2

For Ubuntu 22

root@gateway :~# vi /etc/php/8.1/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so

 

root@gateway:~# vi /etc/php/8.1/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_8.1.so

 

root@gateway:~# systemctl restart apache2

For Debian 9

root@gateway :~# vi /etc/php/7.0/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so

 

root@gateway:~# vi /etc/php/7.0/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so

 

root@gateway:~# systemctl restart apache2

For Debian 10/12

root@gateway :~# vi /etc/php/7.3/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so

 

root@gateway:~# vi /etc/php/7.3/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so

 

root@gateway:~# apachectl restar

For SUSE LINUX 15

root@gateway :~# vi /etc/php7/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

 

root@gateway:~# vi /etc/php7/apache2/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

 

root@gateway:~# apachectl restart

For Nginx on Debain9

root@gateway :~# vi /etc/php/7.0/cli/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so

 

root@gateway:~# vi /etc/php/7.0/fpm/php.ini

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.0.so

 

  root@gateway:~# systemctl reload nginx.service

root@gateway:~#  systemctl reload php7.0-fpm.service

 
Check the PHP version again to see whether ioncube has been loaded properly.

[ root@gateway ~]# php -v

PHP 8.1.26 (cli) (built: Nov 24 2023 08:49:33)

PHP 5.3.3 (cli) (built: Aug 6 2014 11:41:05)

Copyright (c) 1997-2010 The PHP Group

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

with the ionCube PHP Loader v4.4.0, Copyright (c) 2002-2013, by ionCube Ltd.

 

Step 4: Ensure that Ioncube decoders are loaded by viewing the php configuration page.

vi /var/www/html/info.php

<?php

phpinfo();

?>

 

Access the information page, and it will display the loaded Ioncube version. As observed, ionCube version 12.0.5 is currently loaded.