Skip to main content
ionCube Loader is a PHP extension that decodes and executes PHP files that have been encoded using the ionCube Encoder. This is often needed when running commercial PHP software. This guide will show you how to install ionCube Loader on a Linux server such as Ubuntu, Debian, or CentOS using SSH. Let’s go through the steps to install ionCube loader using SSH for the Nginx and OpenLiteSpeed (OLS) web servers.

Step 1: Connect to Your Server

You first need to connect to your server using SSH. Open your terminal and run the command below, replacing username and your_server_ip with your actual server login details.
[!NOTE] Precisa de ajuda visual para esta etapa? Entre em contato com o nosso suporte em support@oriv.cloud.
Copy to clipboard 1 2

Step 2: Check Your PHP Version

Before downloading the loader, you must know which version of PHP is installed on your server. This will determine which loader file you need to use. Copy to clipboard 1 2
The output will show your PHP version. For example: Copy to clipboard 1 2 3 4
From this, collect the version numbers. For example, you have PHP 8.1, which means you will use a loader file named ioncube_loader_lin_8.1.so.

Step 3: Download and Extract ionCube Loader

Now, download the ionCube Loader package into a temporary directory and extract it. Copy to clipboard 1 2 3 4 5 6 7 8
This will create a new folder named ioncube inside /tmp.

Step 4: Find Your PHP Extension Directory

PHP needs to know where to load extensions from. Run the following command to find the extension directory path. Copy to clipboard 1 2
The output will look similar to: filename.js Copy to clipboard 1 2
Copy this path. You will use it when placing the loader file in the next step.

Step 5: Copy the Correct Loader File

Move into the extracted ionCube folder and look for the file that matches your PHP version. Copy to clipboard 1 2 3
Look for the file that matches your PHP version from Step 2. For example, if you are using PHP 8.1, choose ioncube_loader_lin_8.1.so. Copy that file into your PHP extension directory (the path you found in Step 4): filename.js Copy to clipboard 1 2 3
Using sudo here ensures you have permission to copy files into system directories.

Step 6: Configure PHP to Load the Extension

You now need to edit your php.ini file to load ionCube Loader. The location of this file depends on your setup. You may need to edit more than one file one for your web server (FPM or OLS) and one for the command-line interface (CLI). Common locations include:
  • For Nginx / PHP-FPM:
Copy to clipboard 1 2
  • For OpenLiteSpeed:
Copy to clipboard 1 2
  • For CLI:
Copy to clipboard 1 2
Open the relevant file(s) with a text editor such as nano. filename.js Copy to clipboard 1 2 3 4 5 6
At the very top of the file, add the following line. If there are other zend_extension entries, make sure this one is listed first. Copy to clipboard 1 2
Save and close the file. For nano, you do this with Ctrl+X, then press Y, then Enter.

Step 7: Restart Services

For the changes to take effect, restart your PHP process and your web server.

For Nginx / PHP-FPM:

Copy to clipboard 1 2 3 4

For OpenLiteSpeed:

Copy to clipboard 1 2 3 4

Step 8: Verify the Installation

You can confirm that ionCube Loader is working in two ways.

Check via Command Line:

Copy to clipboard 1 2
You should now see an additional line mentioning ionCube Loader, for example: Copy to clipboard 1 2
Create a file named phpinfo.php in your website’s public root directory. Copy to clipboard 1 2 3 4
Open this file in your browser by visiting http://your\_domain.com/phpinfo.php. You should see a section that says “with the ionCube PHP Loader” near the top. Delete this file afterward for security.

Troubleshooting

  • Loader Not Appearing: If php -v does not show ionCube Loader, you may have edited the wrong php.ini file or used an incorrect path. Check the extension directory from Step 4 and the path in Step 6.
  • Website Errors (500, etc.): Review your web server’s error logs. This can happen if there are permission issues with the .so file or if you are using a loader version that does not match your PHP version.
  • Wrong Loader Version: The .so file version must match your PHP version exactly. For example, a PHP 8.0 loader will not work on PHP 8.1.
That is it. You have successfully set up ionCube Loader. Your server can now decode and run ionCube protected PHP code with Nginx or OpenLiteSpeed. You can continue your work, deploy apps, and test your site with confidence in a smooth environment. Still stuck? Contact our support team for any of your queries.