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
- Shell access to the CentOS 8 system with sudo privileges account.
- Complete initial server setup for newly installed systems.
- Install PHP and Apache on CentOS 8
Step 1 – Download ionCube Loader
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
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/
Step 2 – Enable ionCube Loader in PHP
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
Then find out the active PHP version on your system:
php -v
As per the above results, edit /etc/php.ini file and add the following line at the end of the file.
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.2.so
Replace /usr/local/ioncube/ioncube_loader_lin_7.2.so file with your matching PHP version.
Step 3 – Verify Ioncube Loader
Let’s verify the installation and configuration of Ioncube PHP module. Run php -m
command on shell.
php -v PHP 7.2.11 (cli) (built: Oct 9 2018 15:09:36) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd.
Conclusion
You have successfully configured the ionCube loader with PHP on CentOS 8 operating system.
2 Comments
Failed loading /usr/lib64/php/modules/ioncube_loader_lin_7.4.so: /usr/lib64/php/modules/ioncube_loader_lin_7.4.so: undefined symbol: instanceof_function_ex
PHP 8.0.0rc1 (cli) (built: Sep 29 2020 22:36:51) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies
with Zend OPcache v8.0.0rc1, Copyright (c), by Zend Technologies
It looks you are trying to load ioncube loader 7.4 with PHP 8.0. Which is not compatible. Ioncube 7.4 can be used only with PHP 7.4.