This article covers a version of Ubuntu that is no longer supported. If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu:
Reason: Ubuntu 12.04 reached end of life (EOL) on April 28, 2017 and no longer receives security patches or updates. This guide is no longer maintained.
See Instead:
This guide might still be useful as a reference, but may not work on other Ubuntu releases. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. You can use the search functionality at the top of the page to find a more recent version.
IonCube is a PHP module extension that loads encrypted PHP files and speeds up webpages that are being displayed.
It is often required for a lot of PHP-based applications.
This section is for PHP installed on a 32-bit system (for example: spinning up LAMP on Ubuntu 12.04 from Applications).
If you don't have a LAMP stack on your droplet, you can spin up a LAMP stack from our Applications:
First, you will need to download and extract the IonCube Loader PHP modules.
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz tar xvfz ioncube_loaders_lin_x86.tar.gz
Then, you will have to copy the appropriate module to the PHP modules folder. To find that folder's path, run the following command
php -i | grep extension_dir
You will get the following output:
extension_dir => /usr/lib/php5/20090626+lfs => /usr/lib/php5/20090626+lfs
Now you should copy over the module to your PHP modules folder:
PHP_VERSION=$(php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;") sudo cp "ioncube/ioncube_loader_lin_${PHP_VERSION}.so" /usr/lib/php5/20090626+lfs/
You would then have to restart Apache2 or php5-fpm (if you're using nginx) for the module to be loaded:
service apache2 restart service php5-fpm restart
To ensure that the module was correctly installed, create a file called test.php
in /var/www
with the following content:
<?php echo var_export(extension_loaded('ionCube Loader') ,true);
Once you have done that, navigate to http://your-droplets-ip-address/test.php
. It should output "true".
If you have installed your own LAMP stack on a 64-bit Linux, you would need to download a 64 bit package:
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xvfz ioncube_loaders_lin_x86-64.tar.gz
You should proceed with same steps as outlined above.
And you are all done!
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
do we need ioncube on lnmp…?
@lazaac it depends on the web application you’re running. Some applications are encoded and require you to have ioncube loader installed so you have to install it for it to work.
I can not find any ph5 folder in apche…
@admin do you have a LAMP stack installed?
nice this works XD
my 20ioncube.ini have another path for zend_extension
Only watch your path to install correctly
I’m stuck.
When I run this line: zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so
it says -bash: zend-extension: command not found
I run 12.04 with lamp from droplet creation menu.
Please help.
@markopo1: You do not run that line, you write it to a file.
Run the following command: <pre>nano /etc/php5/apache2/conf.d/20ioncube.ini</pre>
This will open up a text editor. Insert this line:
<pre>zend_extension = /usr/lib/php5/20090626+lfs/ioncube_loader_lin_5.3.so</pre>
Press Ctrl + X, Y, enter and the file should be saved.
I cant get past step one, im using 64 bit Ubuntu 12.04, i have a lamp because i have WordPress installed and running, im using the server pilot control panel. When i visit my ip/ioncube/loader-wizard.php i get not found errors, i have tried install multiple times. What am i doing wrong?
@tonyparra216: What’s the output of this command?
<pre>grep -r -i ‘documentroot’ /etc/apache2/sites-enabled</pre>
@Kamal Nasser
“No such file or directory”
@tonyparra216: Are you sure you have apache installed? Did you install it from the official repos (using apt-get install apache2)?
Hmm Im using the serverpilot control panel which is supped to install apache Ill contact them but ill probably go back and reisnstall LAMP myself.
@tonyparra216: I’d recommend contacting them as I don’t know how they set up the servers. They should be able to tell you how to install ionCube on your droplet.
@Kamal Nasser
I decided to just destroy and install lamp myself. I have the ioncube loader successfully installed, however i dont know the command to delete the wizard script from the server.
@tonyparra216: <pre>rm -r /var/www/ioncube</pre>
This is the worst tutorial, who wrote this? Please change the tutorial so the 64-bit option is given at the beginning.
@SaM5246: I don’t see why we should do that. Most people still use 32-bit OSes.
also the lines need to be separated so the readers are not confused, in other articles each command is given separately in it’s own gray space,
cd var/www should be on one line then the next command in a different box
wget “path of latest ioncube file”
for people who have following other DO tutorials it can be very confusing, then you end up wasting 2 hrs trying to figure out why it won’t untar :/
Kamal, I didn’t see there was a 64-bit option, so when I browsed to the end I realized I should use the 64-bit option, plus it is the proper way to write a tutorial ;)
Call me a dummy but when I insert my droplet’s IP into the URL, all I get is a 404 from the default domain I have set up via VirtualMin. I have a few domains I’m configuring on my droplet.
Any ideas how I get around this?
@martin: You can just follow this and you’ll have ionCube installed:
Run <pre>php -r ‘phpinfo();’ 2>/dev/null | grep extension_dir | awk -F’[[:space:]]’ ‘{print $3}’</pre> It should output something similar to <pre>/usr/lib/php5/20121212</pre> (it’s fine as long as it starts with <pre>/usr/lib/php5</pre>).
Copy that path and then move the ioncube_loader_lib_5.3.so file there:
<pre>mv /var/www/ioncube/ioncube_loader_lin_5.3.so //usr/lib/php5/20121212</pre>
ionCube should now be installed on your droplet.
FYI for anyone who built the server using zpanel. The command for installing ioncube should be I have a Ubuntu 64 bit installed
cd /etc/zpanel/panel wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz tar xvfz ioncube_loaders_lin_x86-64.tar.gz
Hi sriram.devang…i am facing some issues here with ioncube…can u connect me to skype
I just cant get past the first step
Whenever I use wget I get this message?
Resolving downloads3.ioncube.com (downloads3.ioncube.com)… failed: Temporary failure in name resolution. wget: unable to resolve host address `downloads3.ioncube.com’
@vs301991: Check /etc/resolv.conf and make sure your DNS servers are proper.
Meanwhile you can use this command instead:
<pre>curl -s -H ‘Host: downloads3.ioncube.com’ ‘http://176.32.99.196/loader_downloads/ioncube_loaders_lin_x86.tar.gz’ > ioncube_loaders_lin_x86.tar.gz</pre>
hi kamaln7 i have done everything stepwise
i see that apache2 is working fine when i enter ip address of droplet i see php working fine when i enter ipaddress/phpinfo.php i see ioncube installed correctly when i enter ipaddress/ioncube/loader-wizard.php
now the issue is that when i try to run test.php it says 404 file not found also tell me how to edit php.ini file to load ioncube
Loader Installer and Loader Wizard… http://www.ioncube.com/loaders.php
I’ve installed zPenel on Ubuntu 12.04 32 bit, how do I go about installing ioncube Loader?
@Nathan: Check out <strong>sriram.devang</strong>'s comment above (<strong>September 25th, 2013 19:35</strong>).
@Kamal: I went and installed the LAMP application, but am now stuck because I get this error when saving in nano: No such file or directory. What do I do now?
What must i do, if i running on nginx?
Install ionCube on Nginx
@Nathan: Do you have zPanel installed currently, or is that on a new droplet based on the LAMP application image?
@Kamal: New droplet based upon LAMP application image.
Forgot to say I had to edit that file because I had screwed up when I entered the path to the ioncube loader.
For security reasons we advise that you remove this Wizard script from your server now that the ionCube Loader is installed.
How to remove the script?
Thanks
@irfantony: Run <pre>rm -r /var/www/ioncube</pre>
i cannot find the loader_wizzard.php file
@pascual.guerrero: What’s the output of <pre>ls -lah /var/www</pre>? Please use a pastebin site such as <a href=“http://pastebin.com/”>pastebin</a>.
“The requested URL /ioncube/loader-wizard.php was not found on this server.” After reading the article i checked for my apache it’s runnig…now what i have to do ???
@sri1990.512: You have to move the ionCube files to a directory which you can access via Apache. Where are you storing your website’s files?
i’m storing my website file in var/www/html…i tried to keep my ioncube inside that but loader-wizard.php was not found also there
@sri1990.512: Try following the article again but replacing <code>cd /var/www</code> with <code>cd /var/www/html</code>.