How To Install ioncube Loader On RHEL 7 / CentOS 7

Learn what ioncube loader is and how to install it on a Linux server (Red Hat Enterprise Linux 7 and CentOS 7). Learn how to install ioncube loader prerequisite as well.

UNDERSTANDING THE SUBJECT MATTER

PHP files/source codes can be protected from theft, plagiarism or even from being changed and run on unauthorized or unlicensed computers by using a tool called ioncube encoder. Protecting PHP scripts varies a lot.

The script, depending on who wants to protect it can be protected in many ways. For example, a developer may choose to protect their source codes from unauthorized users, the codes can be restricted to working only on a particular machine.

Also, a developer who wants to do a POC (proof of concept) of his software may also encode her code to work for a specific time, after the time elapses, the software stops working. The evaluation versions of software you see around can be done with ioncube encoder, provided it is written in PHP.

More so, website owners may choose to protect their files and data from the administrators or the hosting company, as such encode their files

If a PHP file is encoded, then Loading it will require a separate PHP loader such as ioncube loader that needs to be installed on the server/web server and made accessible to PHP, which is what this subject matter is about and what will be done in the “ACTION TIME” section.

What Is Ioncube Loader?

So, it is safe to say that ioncube loader is a PHP extension/module that is used to load encoded PHP files at run-time.

To install ioncube loader, you need PHP and a web server, Nginx or Apache to be installed as well.

Having understood what ioncube loader is, let’s roll down to the installation steps.

ACTION TIME

Step By Step Process Of How To Install Ioncube Loader On RHEL / CentOS 7

1. verify the architecture of the server

[root@HQPRD2 ~]# uname -i

x86_64
[root@HQPRD2 ~]#

2. download the ioncube file from ioncube’s website.

make sure you download the file that matches the architecture of your server, in my case, 64 bit.

[root@HQPRD2 ~]# cd /tmp

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

--2020-02-26 09:17:59--  https://downloads.ioncube.com/loader_downloads/ioncube_         loaders_lin_x86-64.tar.gz
Resolving downloads.ioncube.com (downloads.ioncube.com)... 192.241.136.243
Connecting to downloads.ioncube.com (downloads.ioncube.com)|192.241.136.243|:443         ... connected.
HTTP request sent, awaiting response... 200 OK
Length: 12619062 (12M) [application/x-gzip]
Saving to: ‘ioncube_loaders_lin_x86-64.tar.gz’

100%[======================================>] 12,619,062  1.55MB/s   in 12s

2020-02-26 09:18:12 (1.00 MB/s) - ‘ioncube_loaders_lin_x86-64.tar.gz’ saved [126         19062/12619062]

For 32 bit system, use the below command to download the file.

wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

3. Untar the downloaded file

[root@HQPRD2 tmp]# ls -l ioncube_loaders_lin_x86-64.tar.gz

-rw-r--r--. 1 root root 12619062 Feb 26 04:34 ioncube_loaders_lin_x86-64.tar.gz
[root@HQPRD2 tmp]#
[root@HQPRD2 tmp]# tar xfzv ioncube_loaders_lin_x86-64.tar.gz

ioncube/
ioncube/ioncube_loader_lin_5.0.so
ioncube/ioncube_loader_lin_4.3.so
ioncube/ioncube_loader_lin_7.0_ts.so
ioncube/ioncube_loader_lin_4.2.so
ioncube/ioncube_loader_lin_5.6.so
ioncube/ioncube_loader_lin_7.1.so
ioncube/ioncube_loader_lin_5.3.so
ioncube/ioncube_loader_lin_7.3_ts.so
ioncube/ioncube_loader_lin_5.5_ts.so
ioncube/ioncube_loader_lin_5.4.so
ioncube/loader-wizard.php
ioncube/ioncube_loader_lin_4.3_ts.so
ioncube/ioncube_loader_lin_5.5.so
ioncube/LICENSE.txt
ioncube/USER-GUIDE.pdf
ioncube/ioncube_loader_lin_5.4_ts.so
ioncube/ioncube_loader_lin_7.0.so
ioncube/ioncube_loader_lin_5.3_ts.so
ioncube/ioncube_loader_lin_4.4.so
ioncube/ioncube_loader_lin_4.4_ts.so
ioncube/ioncube_loader_lin_7.3.so
ioncube/ioncube_loader_lin_7.1_ts.so
ioncube/ioncube_loader_lin_7.2_ts.so
ioncube/ioncube_loader_lin_5.2.so
ioncube/USER-GUIDE.txt
ioncube/ioncube_loader_lin_4.1.so
ioncube/README.txt
ioncube/ioncube_loader_lin_5.1_ts.so
ioncube/ioncube_loader_lin_7.2.so
ioncube/ioncube_loader_lin_5.0_ts.so
ioncube/ioncube_loader_lin_5.1.so
ioncube/ioncube_loader_lin_5.6_ts.so
ioncube/ioncube_loader_lin_5.2_ts.so
[root@HQPRD2 tmp]#

4. Install ioncube loader

  • To install ioncube loader, you need to verify the PHP version. To verify, use the command,
[root@HQPRD2 tmp]# php -v

PHP 7.3.0 (cli) (built: Feb 18 2020 11:53:05) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
[root@HQPRD2 tmp]#
  • Verify the directory of the PHP extension by using the following command,
[root@HQPRD2 tmp]# php -i | grep extension_dir

extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules
sqlite3.extension_dir => no value => no value
[root@HQPRD2 tmp]#

  • Now, copy the ioncube loader file of your PHP version to the directory of your PHP extension
[root@HQPRD2 tmp]# cd ioncube

[root@HQPRD2 ioncube]#
[root@HQPRD2 ioncube]# ls
ioncube_loader_lin_4.1.so     ioncube_loader_lin_5.2_ts.so  ioncube_loader_lin_7.1.so
ioncube_loader_lin_4.2.so     ioncube_loader_lin_5.3.so     ioncube_loader_lin_7.1_ts.so
ioncube_loader_lin_4.3.so     ioncube_loader_lin_5.3_ts.so  ioncube_loader_lin_7.2.so
ioncube_loader_lin_4.3_ts.so  ioncube_loader_lin_5.4.so     ioncube_loader_lin_7.2_ts.so
ioncube_loader_lin_4.4.so     ioncube_loader_lin_5.4_ts.so  ioncube_loader_lin_7.3.so
ioncube_loader_lin_4.4_ts.so  ioncube_loader_lin_5.5.so     ioncube_loader_lin_7.3_ts.so
ioncube_loader_lin_5.0.so     ioncube_loader_lin_5.5_ts.so  LICENSE.txt
ioncube_loader_lin_5.0_ts.so  ioncube_loader_lin_5.6.so     loader-wizard.php
ioncube_loader_lin_5.1.so     ioncube_loader_lin_5.6_ts.so  README.txt
ioncube_loader_lin_5.1_ts.so  ioncube_loader_lin_7.0.so     USER-GUIDE.pdf
ioncube_loader_lin_5.2.so     ioncube_loader_lin_7.0_ts.so  USER-GUIDE.txt
[root@HQPRD2 ioncube]#
[root@HQPRD2 ioncube]# cp /tmp/ioncube/ioncube_loader_lin_7.3.so /usr/lib64/php/modules

[root@HQPRD2 ioncube]#

  • Open “/etc/php.ini” file and Add the line below.

zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_7.3.so

[root@HQPRD2 ioncube]# vi /etc/php.ini

5. Restart your web server. Apache or Nginx. Whichever you are using.

[root@HQPRD2 ioncube]# systemctl restart httpd

[root@HQPRD2 ioncube]#

6. Verify that ioncube loader is installed.

[root@HQPRD2 modules]# php -v

PHP 7.3.15 (cli) (built: Feb 18 2020 09:25:23) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.15, Copyright (c) 1998-2018 Zend Technologies
    with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd.
[root@HQPRD2 modules]#
install ioncube loader
  • you can also verify from your web browser.

Tutorial Video On How To Install Ioncube Loader On RHEL / CentOs 7

Be the first to comment

Leave a Reply

Your email address will not be published.


*