Install ioncube on Directadmin control panel

ioncube is very important in Directadmin. It helps to handles the reading and execution of encoded files at run time.

Sometimes, DirectAdmin users experience issues when they have an Incorrect timezone and misconfiguration in the php.ini file which causes errors after installing the Ioncube loader.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix Ioncube errors.

In this context, we shall look into the steps to set up Ioncube loader and fix errors in Directadmin.

How can install Ioncube loader on DirectAdmin?

Sometimes, the IonCube encoding method is used to secure the PHP files. It helps to encrypt PHP files and read encrypt PHP files.

However, to decode the encrypted PHP files, ionCube loaders should install on the server as an additional requirement.

Then, we install ionCube Loader on the webserver and made it available to PHP. Also, we simply add one line to a PHP configuration file (php.ini) to use this ionCube Loader.

Again, installing of Ioncube loader in DirectAdmin is very easy.

Here, let’s see how to install Ioncube loader in DirectAdmin.

1. Initially, we login into the DirectAdmin server as a root user.

2. Then we switch to custombuild directory.

cd /usr/local/directadmin/custombuild

3. After that, we run the following script to install the Ioncube.

./build set ioncube yes
./build ioncube

4. At last, we restart the Apache service to save the changes.

/etc/init.d/httpd restart

That's it. this is how we install Ioncube loaders.

How to install IonCube for cPanel/WHM/Webmail ?

Both the GUI and CLI methods are listed below

Installing IonCube via the WHM

In order to do this you must have administrative privileges, which is ussually the root password. The follow the steps below;

i. Log into the WHM by going to your servers IP followed by /whm or :2087 (ex:

ii. On the left hand side click the 'Tweak Settings' link

iii. Click the PHP tab on the right hand side

iv. Find the configurable option labeled 'cPanel PHP loader' and check the ioncube checkbox

v. Click Save

Installing IonCube via the CLI

In order complete this task you must have shell access to the server as the user root and follow the steps below;

i. Log into the shell as the user root

ii. Edit /etc/cpanel/cpanel.config and find the line that starts with phploader=. If there is no value after the equal sign then you can simply append ioncube to it (ex: phploader=ioncube). If there is another loader already in place you can add your new loader by adding a comma first and then adding your loader (ex: phploader=someloader,ioncube)

iii. Next execute the following command, /usr/local/cpanel/whostmgr/bin/whostmgr2 –updatetweaksettings

iv. And then /usr/local/cpanel/bin/checkphpini

v. and finally /usr/local/cpanel/bin/installphpinis

How to fix common Ioncube errors?

Now let us see the process to tackle this error.

i. Incorrect timezone

Recently, some of our customers set up Roundcube on their server. However. the customers receive the following error when running ./build roundcube.

Failed loading /usr/local/lib/ioncube_loader_lin_5.3.so: /usr/local/lib/ioncube.

This error occurs when the server timezone is set up incorrectly. Then, fix this error changing the date.timezone according to the customer server set up.

ii. Misconfiguration in php.ini file

Similarly. customers may get a problem after installing Ioncube on the server. It didn’t work on the server as we expect and will show an error "ionCube loader not installed".

The misconfiguration in php.ini is another reason for the above error.  For example, if the following line is missing from the php.ini file results the error  "ionCube loader not installed".

zend_extension = /usr/local/ioncube/ioncube_loader_lin_5.2.so

So, adding the above line in php.ini solves the error.

Therefore you need to check and fix any misconfiguration in php.ini.

[Need urgent assistance to install ionCube? We are available to help you today.]


This article will guide you on the steps to set up the Ioncube loader and fix DirectAdmin Ioncube errors such as incorrect timezone and misconfiguration in the php.ini file which cause errors after installing the Ioncube loader in DirectAdmin.