Atlantic.Net Blog

How to Install ionCube Loader on CentOS 7.1

Jose Velazquez
by Atlantic.Net (71posts) under Cloud Hosting
Verified and Tested 09/30/15


In this How-To, we will walk you through the install and configuration of ionCube on CentOS 7.1. The ionCube Loader provides additional security to your PHP files or websites; it’s a PHP module that encrypts basic PHP language making it more secure.


– You need a CentOS 7.1 server that is configured with a static IP address. If you do not have a server already, you can visit our cloud hosting page and spin a new server up in under 30 seconds.

– You will also need to have a LAMP(Linux, Apache, MySQL, PHP) stack platform that can be installed by clicking here if you don’t already have it.

Installing ionCube on CentOS 7.1

To get started, log in to your CentOS 7.1 server via SSH or Console. If you are using the Atlantic.Net cloud hosting service, note that they are setup with minimal installations to avoid having unnecessary packages from being installed and never used. If some software packages that you’re used to using aren’t installed by default, feel free to install them as needed.

Let us download wget so we can simplify this tutorial.

sudo yum install wget

Let’s make sure that your server is fully up-to-date so we can complete the preparation.

sudo yum update

Downloading ionCube on CentOS 7

For this tutorial, I will be downloading the 64-bit version as my system is a 64bit server.  We will use the wget command to get the ionCube file from their website with the following command:


Extract the ionCube file with the following command:

tar xfz ioncube_loaders_lin_x86-64.tar.gz

Alternatively, if you have a 32-bit system you can download the 32-bit version from the site with the following command:


Extract the 32-bit ionCube file with the following command:

tar xfz ioncube_loaders_lin_x86.tar.gz

Configuring ionCube on CentOS 7.1

In order to configure ionCube correctly, we need to know what version of PHP is running on the server. The PHP version will tell us which extension to load. Let’s verify the version PHP by running the following comment:

php -v

The output of the command shows that the system we’re deploying on is running PHP 5.4.

PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Copyright (c) 1997-2013 The PHP Group

Next we need to locate where PHP is loading extensions; this can be done by running the below command and looking

php -i | grep extension_dir
extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules

Note: not all versions of PHP use the same location. On my test environment, the module location is /usr/lib64/php/modules, but on other servers it may be different.

Now that we know the version of PHP and have located the PHP modules folder, we can work to make sure that the correct ionCube module is available. Run the ls (list) command on the ioncube folder to get that information.

ls ioncube

Since the installed version of PHP is 5.4, let’s copy the 5.4 version of the ionCube Loader to the PHP extensions directory we identified earlier:

cp ioncube/ /usr/lib64/php/modules

Once the file has been copied to the extensions directory, we need to make sure that the PHP configuration file is updated to use the correct extension.

Using your favorite text editor open the php.ini file with the following command:

nano /etc/php.ini

At the very top of the file  let’s add the following line:

zend_extension = /usr/lib64/php/modules/

Restart Apache so that the web server can load all the configuration changes that were made with the following command:

service httpd restart

Restart PHP-FPM (if installed)  so that the PHP can accept all the configuration changes that were made with the following command:

service php-fpm restart

Testing ionCube on CentOS 7.1

Now that PHP has been updated to use the ionCube PHP Loader, we need to double check that everything is working. This can be done in one of two ways.

First, you can run the php -v command again. If everything is installed correctly, you will notice that a message stating ionCube Loader is enabled:

php -v
PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies
    with the ionCube PHP Loader (enabled) + Intrusion Protection from (unconfigured) v5.0.18, Copyright (c) 2002-2015, by ionCube Ltd.

The second one is by opening up your browser and going to http://your-server’s-address/info.php. You should get a PHP Version page with the image below.(Note: if you followed the LAMP tutorial that was referenced at the beginning of this how-to, an info.php file was already created).

This is the Zend Engine confirmation that ionCube Loader is currently enabled.

This is the Zend Engine confirmation that ionCube Loader is currently enabled.

What Next?

Congratulations! You now have successfully installed and configured ionCube Loader on CentOS 7.1. Thank you for following along and feel free to check back with us for further updates.

Get started with 12 months of free cloud services

Free Tier includes:
G2.1GB Cloud Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom


We use cookies for advertising, social media and analytics purposes. Read about how we use cookies in our updated Privacy Policy. If you continue to use this site, you consent to our use of cookies and our Privacy Policy.