Install PHP Ioncube Loaders in Ubuntu & Debian . Ioncube is used as the encryption and decryption utility for PHP applications by which we can keep safe our data. It also can restrict PHP application to execute unauthorized. It also assists in speeding up the pages that are served. IonCube loaders are used for decoding encoded files while running on the webserver. read more details on official site. This tutorial will help you to install PHP Ioncube Loaders module in Ubuntu 19.10, 18.04 and 16.04 systems.
Step 1 – Download Ioncube Loaders
First of all download the latest ioncube loaders php modules from ioncube from ioncube download page. Alternatively you can also use following command to download ioncube loaders.
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
Then, extract the downloaded archive under /usr/local directory.
tar xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local
Step 2 – Enable ionCube Loader in PHP
Find out the PHP configuration files for the PHP version you need to install ionCube loader. The below command will show the PHP CLI configuration file location for the current active PHP version.
php -i | grep php.ini Configuration File (php.ini) Path => /etc/php/7.3/cli Loaded Configuration File => /etc/php/7.3/cli/php.ini
As per the result of above command, PHP 7.3 is the active version for PHP CLI. Generally, the same version will be active for Apache too, but you can check it by phpinfo();
function in web browser.
For PHP 7.3, the default the configuration file locations are:
sudo vim /etc/php/7.3/cli/php.ini #for PHP CLI sudo vim /etc/php/7.3/fpm/php.ini #for PHP FPM sudo vim /etc/php/7.3/apache/php.ini #for PHP with Apache
Edit all the above configuration files and append the below code to the end of the files.
zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.3.so
Replace /usr/local/ioncube/ioncube_loader_lin_7.23.so file with your matching PHP version file.
Step 3 – Restart Apache & PHP-FPM Service
After making changes in php.ini for Apache or PHP-FPM, you need to restart the following services.
sudo systemctl restart apache2 #for PHP with Apache sudo systemctl restart php7.3-fpm #for PHP FPM
Step 4 – Verify ionCube Loader
Let’s verify the installation and configuration of Ioncube PHP module. Run php -m
command on shell.
php -v PHP 7.3.14-6+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Feb 5 2020 16:51:13) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.14, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.3.9, Copyright (c) 2002-2019, by ionCube Ltd. with Zend OPcache v7.3.14-6+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
Alternatively, you can also put an phpinfo.php file on your web server document root with the following content and check the status by access info.php in a web browser.
<?php phpinfo(); ?>
8 Comments
Hi, I installed ionCube but when I browse my WordPress website I get 500 error.
please help me
Hi, can ion cube be installed in dual apache? i want to try installing it but on one machine
Hi Khaidir, Not getting your point “dual apache”. ionCube installed for PHP versions only.
Thanks
thanks man you saved my time
Awesome tutorial! Thank you! Keep up the good work !
Thanks, buddy, keep writing.
Thank you very much sir. It just worked for me. I really appreciate your help!