4.9/5 - (10 votes)

How to Install IonCube Loader for whmcs on Ubuntu. IonCube Loader is a PHP extension used by developers to secure their source code. when you are using a PHP script that is encrypted using ionCube. IonCube should be installed in your webserver and made accessible to your encrypted PHP to use it.

In this guide, we are going to teach you how you can install an ionCube loader for whmcs 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 the ionCube loader.

Once downloaded extract it to /usr/local the 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

To verify, add this file in /var/www/html/

<?php
phpinfo();
?>

or create new file info.php and access from your domain and make sure ioncube loader is installed sucessfully 

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

How to Install IonCube Loader for WHMCS on Ubuntuthis tutorial by Shahid Malla

Conclusion

in this tutorial, you learned the installation of ioncube loader for whmcs on Ubuntu/Debian and configure it for Apache or Nginx or CLI.

About the Author

Shahid Malla

Shahid Malla is an accomplished system admin and web developer, renowned for his expertise in various fields. With a strong background in WHMCS development, WordPress development, and PHP development, Shahid has honed his skills over the years to deliver exceptional results. As a top-rated freelancer, he has consistently garnered praise and recognition, earning a stellar 5-star rating from a pool of 500 reviews. Shahid's proficiency extends beyond coding and development, encompassing server configuration, server management, and web security. With his extensive knowledge and dedication to delivering high-quality solutions, Shahid Malla is your go-to professional for all your technical needs.

View All Articles