How To Install ionCube on Ubuntu 20.04
ionCube is PHP extension that is used to load ionCube encoded PHP files. ionCube is used to protect commercial PHP scripts by encoding it, so no one can read the actual PHP code.
First, download ioncube loader from
https://www.ioncube.com/loaders.php
cd /usr/local/src wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xvf ioncube_loaders_lin_x86-64.tar.gz cd ioncube/
Find extension directory and copy .so file to PHP extension directory. To find PHP extension directory run
php -i | grep extension_dir
On my installation, i have PHP extension_dir set to /usr/lib/php/20190902. If it’s different for you, change the path in the following command.
For PHP 7.4, run
cp /usr/local/src/ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20190902
Enable ioncube
echo "zend_extension=ioncube_loader_lin_7.4.so" > /etc/php/7.4/mods-available/ioncube.ini ln -s /etc/php/7.4/mods-available/ioncube.ini /etc/php/7.4/cli/conf.d/01-ioncube.ini
for Apache, run
ln -s /etc/php/7.4/mods-available/ioncube.ini /etc/php/7.4/apache2/conf.d/01-ioncube.ini systemctl restart apache2
for php-fpm, run
ln -s /etc/php/7.4/mods-available/ioncube.ini /etc/php/7.4/fpm/conf.d/01-ioncube.ini systemctl restart php7.4-fpm