How to Install IonCube Loader in CentOS 7

What is ionCube?

IonCube is a commercial software suite consisting of a PHP encoder, package foundry, bundler, a real time site intrusion detection and error reporting application as well as a loader. ionCube was founded in 2002, and introduced tools to protect software written using the PHP programming language from being viewed, changed, and run on unlicensed computers. A PHP extension called the ionCube Loader handles the reading and execution of encoded files at run time.

Step 1: Install Apache with PHP

First, install the Apache with PHP on your system.

yum install httpd php php-cliphp-mysql

After installing Apache with PHP on your system, start the webserver and make sure to enable it to auto-start at system boot time using the following commands.

systemctl start httpd
systemctl enable httpd

Step 2: Download IonCube Loader

Next, go to the inocube’s website and download the installation files, but first, you need to check whether your system is running on 64-bit or 32-bit architecture using the following command.

uname -a

For 64-bit System

cd /tmp
wgethttps://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz

For 32-bit System

cd /tmp
wget  https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz

Then unzip the downloaded file using the tar command and move into the decompressed folder.

tar -zxvf ioncube_loaders_lin_x86*
cd ioncube/
ls -l

Step 3: Install ionCube Loader for PHP

There will be different ioncube loader files for various PHP versions, you need to select the right ioncube loader for your installed PHP version on your server.

php -v

Next, find the location of the extension directory for PHP version 5.4, it is where the ionCube loader file will be installed. From the output of this command, the directory is /usr/lib64/php/modules.

php -i grep extension_dir

extension_dir => /usr/lib64/php/modules => /usr/lib64/php/modules

Next we need to copy ioncube loader for our PHP 5.4 version to the extension directory /usr/lib64/php/modules

cp /tmp/ioncube/ioncube_loader_lin_5.4.so /usr/lib64/php/modules

Replace the PHP version and extension directory in the above command according to your system configuration.

Step 4: Configure ionCube Loader for PHP

Now we need to configure ionCube loader to work with PHP, in the php.ini file.

vi /etc/php.ini

Then add below line as the first line in the php.ini file.

zend_extension = /usr/lib64/php/modules/ioncube_loader_lin_5.4.so

Then save and exit the file. Now we need to restart the Apache.

systemctl restart httpd

Step 5: Test ionCube Loader

To test if ionCube loader is now installed and properly configured on your server, check your PHP version once more. You should be able to see a message indicating that PHP is installed and configured with the ionCube loader extension status should be enabled.

php -v

Conclusion

We hope everyone understands the installation of ionCube Loader. It Protects proprietary server-side PHP code from observation and Increases runtime efficiency. TheStack has been in market for quite long providing premium wordpress hosting, hybrid smart server hosting, SEO dedicated server hosting and managed virtual private servers at the best price. So, what are you waiting for? Get in touch with us to get a quote.

Related Articles