Tutorial

How To Install IonCube Loader on Ubuntu 12.04

Published on June 3, 2013
author

Bulat Khamitov

How To Install IonCube Loader on Ubuntu 12.04

Status: Deprecated

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.

Note: This article has been updated for Ubuntu 16.04.

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.

IonCube on 32-bit systems

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".

IonCube on 64-bit systems

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.

Learn more about our products

About the authors
Default avatar
Bulat Khamitov

author

Still looking for an answer?

Ask a questionSearch for more help

Was this helpful?
 
10 Comments


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…?

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
June 13, 2013

@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…

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
July 4, 2013

@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.

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
August 8, 2013

@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?

Kamal Nasser
DigitalOcean Employee
DigitalOcean Employee badge
August 21, 2013

@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”

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Join the Tech Talk
Success! Thank you! Please check your email for further details.

Please complete your information!

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.