Table of Contents
The ionCube loader is the library used to load ionCube encoded files on the server. It is required to installed on the webserver to decode any ionCube encoded files before running. The ionCube provides a feature to encrypt your PHP script to keep them secure. It also keeps them secure from unauthorized uses.
This tutorial will help you to configure the ionCube loader with PHP on CentOS 8.
Prerequsities
- SSH access to the CentOS 8 system with sudo privileges account. (su -)
- Complete initial server setup for newly installed systems.
- Installed PHP and Apache on CentOS 8
Install ionCube Loader in CentOS 8
1️⃣ First of all, download the latest ionCube loaders on your system from ioncube download page. Alternativly, you can also use the following command to download ionCube loaders archive for 64-bit systems.
wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
2️⃣ After downloading the file, extract it under /usr/local/ioncube directory. You can change this location as suitable for you.
tar xzf ioncube_loaders_lin_x86-64.tar.gz
sudo mv ioncube /usr/local/
3️⃣ Get the list of available loaders for PHP. In our CentOS 8 Linux system with PHP 7.4, we need this loader ioncube_loader_lin_7.4.so.
ls -l /usr/local/ioncube/
[root@cs8 ~]# ls -l /usr/local/ioncube/
total 39260
-rw-rw-r-- 1 507 507 472192 Sep 9 17:49 ioncube_loader_lin_4.1.so
...
-rw-rw-r-- 1 507 507 1520056 Sep 9 17:51 ioncube_loader_lin_5.5.so
-rw-rw-r-- 1 507 507 1602040 Sep 9 17:52 ioncube_loader_lin_5.5_ts.so
-rw-rw-r-- 1 507 507 1485192 Sep 9 17:52 ioncube_loader_lin_5.6.so
-rw-rw-r-- 1 507 507 1549640 Sep 9 17:52 ioncube_loader_lin_5.6_ts.so
-rw-rw-r-- 1 507 507 1254608 Sep 9 17:53 ioncube_loader_lin_7.0.so
-rw-rw-r-- 1 507 507 1316080 Sep 9 17:53 ioncube_loader_lin_7.0_ts.so
-rw-rw-r-- 1 507 507 1355080 Sep 9 17:53 ioncube_loader_lin_7.1.so
-rw-rw-r-- 1 507 507 1438760 Sep 9 17:54 ioncube_loader_lin_7.1_ts.so
-rw-rw-r-- 1 507 507 1407568 Sep 9 17:54 ioncube_loader_lin_7.2.so
-rw-rw-r-- 1 507 507 1489008 Sep 9 17:54 ioncube_loader_lin_7.2_ts.so
-rw-rw-r-- 1 507 507 1316800 Sep 9 17:55 ioncube_loader_lin_7.3.so
-rw-rw-r-- 1 507 507 1386880 Sep 9 17:55 ioncube_loader_lin_7.3_ts.so
-rw-rw-r-- 1 507 507 1363392 Sep 9 17:56 ioncube_loader_lin_7.4.so
-rw-rw-r-- 1 507 507 1430848 Sep 9 17:56 ioncube_loader_lin_7.4_ts.so
-rw-rw-r-- 1 507 507 1401736 Sep 9 17:56 ioncube_loader_lin_8.1.so
-rw-rw-r-- 1 507 507 1506216 Sep 9 17:57 ioncube_loader_lin_8.1_ts.so
-rw-rw-r-- 1 507 507 1439016 Sep 9 17:57 ioncube_loader_lin_8.2.so
-rw-rw-r-- 1 507 507 1546568 Sep 9 17:58 ioncube_loader_lin_8.2_ts.so
Enable ionCube Loader in PHP
1️⃣ Edit the php.ini file and add the following line at the end of the file. To find php.ini file you can use following command.
php -i | grep php.ini
Configuration File (php.ini) Path => /etc
Loaded Configuration File => /etc/php.ini
2️⃣ Then find out the active PHP version on your system:
php -v
PHP 7.4.33 (cli) (built: Aug 1 2023 08:47:49) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
3️⃣ As per the above results, edit /etc/php.ini file and add the following line at the beginning of the file.
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so
4️⃣ Finally, let’s verify the installation and configuration of Ioncube PHP module. Run php -v command on the shell.
[root@cs8 ~]# php -v
PHP 7.4.33 (cli) (built: Aug 1 2023 08:47:49) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with the ionCube PHP Loader + ionCube24 v13.0.2, Copyright (c) 2002-2023, by ionCube Ltd.
with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies
You have successfully configured the ionCube loader with PHP on CentOS 8 operating system.
Not a reader? Watch this related video tutorial: