Ioncube: A Users Guide

Ioncube: A Users Guide

Since its introduction into AOM with V4.2.0, Ioncube has probably been one of the most misunderstood components of the entire program. Certainly, people who were originally attracted to Associate-O-Matic because of its ease of use were horrified at the level of programming complexity that seemed to suddenly be required. I will admit that I found it a struggle at first, but as the weeks have gone by, I have had the clouds lift somewhat. Hopefully I can answer some questions about what I have learned, to the benefit of those who are still put off by the whole thing. Note that this information is also available on the AOM IonCube support page.


1. What is IonCube?

IonCube is a PHP encoder, which is used to encrypt PHP source files. It prevents the AOM code from being copied, altered or used in other programs without permission. Basically it secures the program to prevent it being stolen.

2. Why is it now being used with AOM?

The AOM source code prior to V4.2.0 was encrypted in a different manner, which used the aom.php file to secure the code. Eventually this encryption was cracked, and pirated copies of the software began to appear. IonCube uses a much stronger method of locking the code. Also, since Amazon has introduced extra AWS keys, this means all the pirate copies will no longer function after August 15th, 2009.

3. Do I need to buy a license to use IonCube with AOM?

No! AOM customers do not need to purchase an IonCube license to use it with their stores. A license is required for the developer who uses IonCube to encrypt their code, but not for the end user. We bought the license – it’s totally, completely, 100% free for you to use with whichever version of AOM you have.

4. How do I install it?

For many users, IonCube will install automatically; you don’t have to do anything special other than the usual AOM upgrade process. Others may have to delve into a manual install. In these cases, basically what you’re doing is providing a path for your server to load the IonCube files. When you install or upgrade to a version of AOM that uses IonCube, you might find a message like this when you try to log into the control panel:

Site error: the file /usr/www/users/accountname/public_html/store/admin.php requires the ionCube PHP Loader to be installed by the site administrator.

Make a note of the part in bold up to ‘/admin.php’. That’s the file path we’ll need in a moment, replacing ‘admin.php’ with ‘/ioncube’.

You should then point your browser to the ioncube-loader-helper.php file in the /ioncube directory:

This will take you to this page:

Click on the php.ini installation instructions:

IonCube php.ini installation instructions

The important information here is in the green box:  zend_extension = /<path>/ Fill in the <path> spot with the file path you got from the initial message, adding the /ioncube folder in place of ‘admin.php’: /usr/www/users/accountname/public_html/store. What you end up with is:

zend_extension = /usr/www/users/accountname/public_html/store/ioncube/

This is the file path to the IonCube loader you need. The next step is to add this line to your php.ini file. If there are any other ‘zend_extension =’ lines in the file, add the new line above them. Ask your webhost for help if you’re unsure about how to edit your php.ini file. Your webhost can also tell you if the server needs restarted or not once the file is added.

And that should do it. Returning to should tell you if the install was a success or not (remember your server may need restarted). It’s not really as complicated as it may first appear.

5. What if the loader file I need isn’t included in the /ioncube folder?

The loaders included with AOM are the most common, but not all of the loader files IonCube has available . You can go directly to the IonCube loader site to look for the one you need. If you don’t see it there, contact IonCube directly for assistance.

Also, note that the files included with AOM are 32-bit only. For 64-bit loader files, see the link above.

6. Is there an easier method than that?

It will depend on your host. We dealt with GoDaddy in the previous post (Click on the GODADDY button at the top of this page and look for the ‘IonCube and GoDaddy’ post). Also there are alternative methods for Bluehost, Dreamhost, Ipower and Jumpline customers:

Bluehost – They have an FAQ Thread that explains how to activate IonCube.

Dreamhost – Strictly speaking DH does not appear to authorize changes to the php.ini file. However, an automated script is available from this website that does it all for you. The script is free (donations are accepted), but site registration is required.

Ipower – An FAQ on-site says depending on which version of PHP you use, you need to insert one of the following lines in your php.ini file:

* for PHP4
zend_extension = /usr/local/lib/ioncube/
* for PHP5
zend_extension = /usr/local/lib/ioncube/

The php.ini file is reached from the CGI and Scripted Langage Support button on the control panel. Then PHP Scripting and select the version you’re using. Scroll down to the end of the file and look for the [ZEND] section. Paste one of the lines above as the first line of that section and save.

Jumpline – Their Support staff recommend the following procedure: Create a file named 49ioncube.ini in the /etc/php.d directory on your hosting plan, then put the following text inside of the 49ioncube.ini file (replacing /path/to with the path where the file was uploaded).

zend_extension = /path/to/

Next, create a file called 99user.ini in the /etc/php.d directory (if it has not already been created) and put the following lines inside of the 99user.ini file.

zend_optimizer.enable_loader = 1
zend_optimizer.disable_licensing = 0

Once these steps have been completed, you can restarted the server from within the VDS Manager by logging in to the VDS Manager, clicking on the “Web Server” listing in the navigation menu, then clicking on the “Restart” button. Restarting the web server will start the web server with the ionCube software loaded.

We will try to add more information about other hosts as we hear about them. Check with your own host for details about how they use or don’t use IonCube.

7. What if my host does not support IonCube and will not allow me to install it?

There are hosts out there that will not allow users to edit php.ini files. Usually this makes sense, especially on a shared server, since errors could cause problems for a great many people. But if the host cannot or will not accommodate you by offering support, the only option would be to move your sites to a different host.

8. If I have multiple AOM sites on the same server, do I need to install IonCube on all of them?

You shouldn’t have to, if you install IonCube a level above all your sites, if possible. For example, if you have several stores all set up as subdirectories of a common root, then you can install IonCube in the root. Every server seems to be different, so if this does not work for you, you may have to install it multiple times.

9. Once installed, are all the ioncube files necessary?

Certainly not the ones you didn’t use. Once IonCube has been successfully loaded on your site, the extra loaders can be safely deleted. If your host already has IonCube set up, you could delete the entire /ioncube folder if you would like to reclaim the disc space it takes up.

10. Where can I get more information?

You can read the instructions from IonCube here.

Latest posts

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.