How To Install IonCube Loader on Ubuntu Server

If you are looking for IonCube Loader installation guide on Ubuntu (server) operating system, then this is the right place to find it. I’m sure you all ready came across many other out dated instruction online regarding this. If you follow any of those instruction, then your server/site will stop working because of server misconfiguration.

To make it even worse, the official documentation of ioncube loader is also providing out-dated instruction. After struggling one and half day, I finally figured it out.

If I’m not wrong you can follow this guide for other Linux based O.S. as well.

Note: Please don’t try on live server. I recommend you to try on some test server before you implement on live server. You can use Digital Ocean server for cheap VPS. They charge just $5 Per Month! Moreover you will get $10 account credit after signup.

Tip: If you don’t bother to deal with all these technical stuff, then go and search on and get the thing done for just $5.

Installing IonCube Loader on Ubuntu 14.04.1 LTS:



1. First check the O.S version by using below command
root@test:~# cat /etc/lsb-release


2.  On your root directory create ioncube loader installation checking php file.
root@test:/var/www/html# nano loader-check.php

3. Now paste below code on loader-check.php file
echo var_export(extension_loaded('ionCube Loader') ,true);


4. Now open the file on your browser. In my case

if you see “true” then IonCube loader is successfully installed. If you see “False” then IonCube loader is not installed on your server.


5. Now we need to find out which bit (32 or 64 bit) O.S we are using on server. To check use below command

root@test:~# uname –a
Linux test 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

If you got the above result then you are using 64 bit version or else you will be using 32 bit version.

In my case I’m using 64 bit version of ubuntu O.S so I need to download 64 bit version of IonCube loader. You can download IonCube loader here.


6.  Now download loader from official page. Make sure you downloading correct setup.

root@test:/var/www/html# wget


7. Extract it.
root@test:/var/www/html# tar xvfz ioncube_loaders_lin_x86-64.tar.gz

8. Now open the loader-wizard.php file on your browser. Check inside the extracted folder. In my case it is located at


9. Once you open choose “Local install” option. Now it will automatically check what are the things we need to do.

In my case I’m seeing below errors.

Please note that the following problem currently exists with the ionCube Loader installation:

The necessary zend_extension line could not be found in the configuration.

Please note also the following issues:

Some functions are disabled through disable_functions. This may affect the operation of this Loader Wizard.

The correct loader for your system has been found at /var/www/html/ioncube/ You may wish to copy the loader from /var/www/html/ioncube/ to /usr/lib/php5/20121212.


10. Check the php version by using below command.

root@test:/var/www/html/ioncube# php –v

PHP 5.5.9-1ubuntu4.4 (cli) (built: Sep  4 2014 06:56:34)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

Form the above result I can see my php version is 5.5. Note it down somewhere.


11. Now check where our PHP modules folder is located

root@test:/var/www/html/ioncube# php -i | grep extension_dir
extension_dir => /usr/lib/php5/20121212 => /usr/lib/php5/20121212


12. Now we need to copy appropriate IonCube file to PHP module folder. So navigate to ioncube extracted folder and check 5.5 file. Because our PHP version is 5.5.

root@test:/var/www/html/ioncube# sudo cp /usr/lib/php5/20121212/

Notice: (loader file) and my PHP version 5.5.9 (check step 10) are same.


13. As per loader-wizard.php file we need to create one more file called “20-ioncube.ini” at /etc/php5/apache2/conf.d so use below commands to create it.

root@test:/var/www/html/ioncube# sudo nano /etc/php5/apache2/conf.d/20-ioncube.ini

now paste the content of 20-ioncube.ini file which you downloaded. In my case it is

zend_extension = /usr/lib/php5/20121212/


14. As per the official document now we need to restart server. If you try to restart ubuntu server by using below command

root@test:/var/www/html/ioncube# sudo service apache2 restart

* Restarting web server apache2                                                                                                                             [fail] * The apache2 instance did not start within 20 seconds. Please read the log files to discover problems

you will get error message. To check why it is causing you can visit

root@test:/var/www/html/ioncube# tail /var/log/apache2/error.log

PHP Fatal error:  [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0


15. To fix this open apache2 php.ini file

root@test:~# sudo nano /etc/php5/apache2/php.ini

and add below line which you got on 20-ioncube.ini file. Make sure you are adding it on first line itself, that is above [PHP] entry.

zend_extension = /usr/lib/php5/20121212/


16. Now restart server.
root@test:/var/www/html/ioncube# sudo service apache2 restart


If you have any doubt feel free to comment.

Click Here to Leave a Comment Below 14 comments
Clare - April 29, 2015

You are a STAR! I have wasted two hours of my life going around and around in circles on this with each tutorial being out of date. Expect a flow of traffic as I’m going to share this over on Digital Ocean!

koffi - April 30, 2015

followed these steps and still have he issue.
PHP Fatal error: [ionCube Loader] The Loader must appear as the first entry in the php.ini file in Unknown on line 0

Any suggestion

    ARUN KUMAR - May 1, 2015

    Check 14th and 15th step to fix that issue.

Steve - May 26, 2015

Bless you, Arun! Thank you!

Hamis Jabe - November 7, 2015

This is the best tutorial i have ever seen on installing ioncube on ubuntu. Big Up Man

freddie - November 15, 2015

Very good step-by-step tutorial for ioncube!

Just one request: How to create 20-ioncube.ini without using conf.d, instead use the conf-available and conf-enabled folders?

Thanks for your great work

freddie - November 15, 2015

By the way, this code gave me a blank page:
at the end worked fine.

Thanks again for helping a stupid noob — me.

    freddie - November 15, 2015

    The php code I posted won’t show. It’s about step 3 above missing the closing question mark and closing arrow.

Gabe - November 20, 2015

Nicely done. This saved me so much time installing ioncube. Cheers

Harry J - April 23, 2016

greetings, thank you for knowledge… I get this error

root @ panel: ~ # php -v
Failed loading /usr/lib/php5/20121212/ /usr/lib/php5/20121212/ undefined symbol: pow_function
PHP 5.5.9-1ubuntu4.14 (cli) (built: October 28, 2015 1:34:46)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
     With Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

I did wrong?

Dominique - July 14, 2016

Works great! Thanks!

ವಾ - September 16, 2016

Perfect! Thank you very much.

szoupi - September 19, 2016

congruts!! saved my time


Leave a Reply: