Step 1 — Choosing the Right ionCube Version

Create a file called info.php file in the root directory of your web server (likely /var/www/html, unless you’ve changed it) using nano or your favorite text editor.

  • sudo nano /var/www/html/info.php

Paste the following inside the file, then save and close it.

info.php
<?php
phpinfo();

After saving the changes to the file, visit http://your_server_ip/info.php or http://your_domain.com/info.php in your favorite browser. The web page you’ve opened should look something like this:

Step 2 — Setting Up ionCube

Visit the ionCube download page and find the appropriate download link based on your OS. In our example, we need the this 64-bit Linux version. Copy the tar.gz link on the site and download the file.

  • wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
 
 

Next, extract the archive.

  • tar xvfz ioncube_loaders_lin_x86-64.tar.gz
 
 

This creates a directory named ioncube which contains various files for various PHP versions. Choose the right folder for your PHP version. In our example, we need the file PHP version 7.4, which is ioncube_loader_lin_7.4.so. We will copy this file to the PHP extensions folder.

To find out the path of the extensions folder, check the http://your_server_ip/info.php page again and search for extension_dir.

In this example, it’s /usr/lib/php/20151012, so copy the file there:

  • sudo cp ioncube/ioncube_loader_lin_7.4.so /usr/lib/php/20151012/
 

For PHP to load the extension, we need to add it to the PHP configuration. We can do it in the main php.ini PHP configuration file, but it’s cleaner to create a separate file. 

To find out where we should create the custom configuration file, look at http://your_server_ip/info.php again and search for Scan this dir for additional .ini files.

So, we’ll create a file named 00-ioncube.ini inside the /etc/php/7.4/apache2/conf.d directory. The 00 at the beginning of the filename ensures this file will be loaded before other PHP configuration files.

  • sudo nano /etc/php/7.4/apache2/conf.d/00-ioncube.ini
 

Paste the following loading directive, then save and close the file.

00-ioncube.ini
zend_extension = "/usr/lib/php/20151012/ioncube_loader_lin_7.4.so"
 
 

For the above change to take effect, we will need to restart the web server.

If you are using Apache, run:

  • sudo systemctl restart apache2.service

 

 

Method 2

 1. Download 

  • wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
 
 

2. Next, extract the archive.

  • tar xvfz ioncube_loaders_lin_x86-64.tar.gz

 

Edit File: 

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

 

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

That's it Need More Help Try This Install ionCube Ubuntu

Was this answer helpful? 28 Users Found This Useful (112 Votes)