Google Cloud Compute Engine

How to Install IonCube Loader on Ubuntu

Disclosure: This post may contain affiliate links, which means we may receive a commission if you click a link and purchase something that we recommended.

Pinterest LinkedIn Tumblr

How to Install IonCube Loader on Ubuntu. IonCube Loader is a PHP extension used when you are using a PHP script that is encrypted using ionCube. IonCube needs to be installed in your webserver and made accessible to your PHP to use it.

In this guide you are going to learn how to install ionCube loader on Ubuntu or Debian and configure your PHP or PHP-FPM and PHP-CLI to use it.

Step 1: Download IonCube Loader

You can download the latest ionCube loader from the official website. Copy the link from the packages and download it to your server using wget.

sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_
loaders_lin_x86-64.tar.gz

This will download the latest version of ionCube loader.

Once downloaded extract it to /usr/local directory using the following command.

sudo tar xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/local

Delete the downloaded file.

sudo rm -rf ioncube_loaders_lin_x86-64.tar.gz

Step 2: Install IonCube Loader

Here you will see how to install this extension for PHP 7.4. If you see the extracted files you can see the loaders for each PHP version.

ls /usr/local/ioncube

You will see something similar to this.

. . .
ioncube_loader_lin_7.4.so
ioncube_loader_lin_7.4_ts.so
. . 

This is the file that needs to be added to your php.ini.

Installation for PHP with Apache

For Apache the php.ini is located here /etc/php/7.4/apache2/php.ini.

Open your php.ini file using the following command.

sudo nano /etc/php/7.4/apache2/php.ini

Add the following line to the bottom of the file.

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

Hit CTRL+X followed by Y and Enter to save and exit the file.

Restart Apache for the changes to take effect.

sudo service apache2 restart

Installation for PHP-FPM with Nginx

For PHP-FPM the php.ini is located here /etc/php/7.4/fpm/php.ini.

Open your php.ini file using the following command.

sudo nano /etc/php/7.4/fpm/php.ini

Add the following line to the bottom of the file.

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

Hit CTRL+X followed by Y and Enter to save and exit the file.

Restart PHP-FPM for the changes to take effect.

sudo service php7.4-fpm restart

Installation for PHP-CLI

For PHP-FPM the php.ini is located here /etc/php/7.4/cli/php.ini.

Open your php.ini file using the following command.

sudo nano /etc/php/7.4/cli/php.ini

Add the following line to the bottom of the file.

zend_extension = /usr/local/ioncube/ioncube_loader_lin_7.4.so

Hit CTRL+X followed by Y and Enter to save and exit the file.

Now if you check the installed PHP version from your command line interface, you will see PHP is loaded with IonCube loader.

PHP 7.4.3 (cli) (built: Oct  6 2020 15:47:56) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
     with the ionCube PHP Loader + ionCube24 v10.4.5, Copyright (c) 2002-2020, by ionCube Ltd.
     with Zend OPcache v7.4.3, Copyright (c), by Zend Technologies

Conclusion

Now you have learned how to install IonCube Loader on Ubuntu/Debian and configure it for Apache or Nginx or CLI.

Thanks for your time. If you face any problem or any feedback, please leave a comment below.

3 Comments

  1. spelling guy Reply

    Once downloaded extract it to /ust/local directory <<< should say /usr/

  2. I followed these instructions but am seeing the following error when checking the PHO version.

    # php -v
    Failed loading /usr/local/ioncube/ioncube_loader_lin_7.4.so: /usr/local/ioncube/ioncube_loader_lin_7.4.so: cannot open shared object file: No such file or directory
    PHP 7.4.27 (cli) (built: Dec 20 2021 21:32:33) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.27, Copyright (c), by Zend Technologies
    #

Write A Comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.