This tutorial shows you how to actually install the module ionCube PHP loader in Ubuntu & Debian with the NGINX web server. The reason I am writing this tutorial even though there are many other similar ones is because they do not work. They have missed a step 😛
Step 1: Download & Extract ionCube
Alright so lets download ionCube
Then extract it!
tar -xvf ioncube_loaders_lin_x86*
Next you want to enter it:
Okay so from now on you need to start using your brain a bit :P. First type the command ls to list the files within the directory.
You will see multible similar files but with all of them having a different ending, 5.6, 7.0, 7,3 and so on. These are to your corresponding PHP version. You can check what PHP version you are running by running the following commad
So if you are using PHP version 7.3 you want to copy that file. But first we need to find out what extension directory you have. To do this:
php -i | grep extension_dir
Here’s an example output:
extension_dir => /usr/lib/php/20180731 => /usr/lib/php/20180731
/usr/lib/php/20180731 will be different from mine.
Okay so if you are using PHP version 7.3 you need to copy ioncube_loader_lin_7.3.so to your extension directory like so:
cp /ioncube/ioncube_loader_lin_7.3.so /usr/lib/php/20180731
Step 2: Add the extension to the php.ini files
Next you want to add this configuration to both of your php.ini configuration files. (don’t forget to replace the extension number with your own)
zend_extension = /usr/lib/php/20180731/ioncube_loader_lin_7.3.so
Add the above configuration to he following files. This should be added right below [PHP]
That’s it! Now all you need to do is to restart NGINX and PHP:
systemctl restart nginx
systemctl restart php-fpm
You can confirm that it has been installed by running
It should print out something along these lines:
Copyright (c) 1997-2018 The PHP Group Zend Engine v3.3.8, Copyright (c) 1998-2018 Zend Technologies with the ionCube PHP Loader + ionCube24 v10.3.8, Copyright (c) 2002-2019, by ionCube Ltd.