The ionCube Loader is a PHP extension that enables PHP to execute files encoded using the ionCube Encoder.
In this tutorial, we'll show you how to install the ionCube Loader on your servers.
The following commands will delete previous versions of ioncube_loader tarballs located in /usr/local:
cd /usr/local sudo rm ioncube_loaders*.tar.gz
To install the ionCube Loader, SSH in to your server as the root user and run the following commands for the PHP version you're adding the ionCube loader to.
As of October 2024, IonCube loader does not yet support PHP 8.4.
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_8.3.so /opt/sp/php8.3/lib/php/extensions/no-debug-non-zts-20230831/ sudo bash -c 'echo "zend_extension=/opt/sp/php8.3/lib/php/extensions/no-debug-non-zts-20230831/ioncube_loader_lin_8.3.so" > /etc/php8.3-sp/conf.d/20ioncube.ini' sudo service php8.3-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_8.2.so /opt/sp/php8.2/lib/php/extensions/no-debug-non-zts-20220829/ sudo bash -c 'echo "zend_extension=/opt/sp/php8.2/lib/php/extensions/no-debug-non-zts-20220829/ioncube_loader_lin_8.2.so" > /etc/php8.2-sp/conf.d/20ioncube.ini' sudo service php8.2-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_8.1.so /opt/sp/php8.1/lib/php/extensions/no-debug-non-zts-20210902/ sudo bash -c 'echo "zend_extension=/opt/sp/php8.1/lib/php/extensions/no-debug-non-zts-20210902/ioncube_loader_lin_8.1.so" > /etc/php8.1-sp/conf.d/20ioncube.ini' sudo service php8.1-fpm-sp restart
The ionCube loader does not support PHP 8.0.
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_7.4.so /opt/sp/php7.4/lib/php/extensions/no-debug-non-zts-20190902/ sudo bash -c 'echo "zend_extension=/opt/sp/php7.4/lib/php/extensions/no-debug-non-zts-20190902/ioncube_loader_lin_7.4.so" > /etc/php7.4-sp/conf.d/20ioncube.ini' sudo service php7.4-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_7.3.so /opt/sp/php7.3/lib/php/extensions/no-debug-non-zts-20180731/ sudo bash -c 'echo "zend_extension=/opt/sp/php7.3/lib/php/extensions/no-debug-non-zts-20180731/ioncube_loader_lin_7.3.so" > /etc/php7.3-sp/conf.d/20ioncube.ini' sudo service php7.3-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_7.2.so /opt/sp/php7.2/lib/php/extensions/no-debug-non-zts-20170718/ sudo bash -c 'echo "zend_extension=/opt/sp/php7.2/lib/php/extensions/no-debug-non-zts-20170718/ioncube_loader_lin_7.2.so" > /etc/php7.2-sp/conf.d/20ioncube.ini' sudo service php7.2-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_7.1.so /opt/sp/php7.1/lib/php/extensions/no-debug-non-zts-20160303/ sudo bash -c 'echo "zend_extension=/opt/sp/php7.1/lib/php/extensions/no-debug-non-zts-20160303/ioncube_loader_lin_7.1.so" > /etc/php7.1-sp/conf.d/20ioncube.ini' sudo service php7.1-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_7.0.so /opt/sp/php7.0/lib/php/extensions/no-debug-non-zts-20151012/ sudo bash -c 'echo "zend_extension=/opt/sp/php7.0/lib/php/extensions/no-debug-non-zts-20151012/ioncube_loader_lin_7.0.so" > /etc/php7.0-sp/conf.d/20ioncube.ini' sudo service php7.0-fpm-sp restart
cd /usr/local sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz sudo cp ioncube/ioncube_loader_lin_5.6.so /opt/sp/php5.6/lib/php/extensions/no-debug-non-zts-20131226/ sudo bash -c 'echo "zend_extension=/opt/sp/php5.6/lib/php/extensions/no-debug-non-zts-20131226/ioncube_loader_lin_5.6.so" > /etc/php5.6-sp/conf.d/20ioncube.ini' sudo service php5.6-fpm-sp restart
You can verify the ionCube Loader extension is installed correctly by running this command:
phpX.Y-sp -i | grep -i ioncube
You should see output like the following:
Additional .ini files parsed => /etc/phpX.Y-sp/conf.d/20ioncube.ini, with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v10.0.0 (), Copyright (c) 2002-2017, by ionCube Ltd. ionCube Loader
To remove ionCube loader from a PHP version you had previously installed it on, run the following commands as root.
sudo rm /etc/phpX.Y-sp/conf.d/20ioncube.ini sudo service phpX.Y-fpm-sp restart