Installing ionCube Loader for PHP
ionCube Loader is needed to run paid components on your server that the site relies on. Such components usually have obfuscated code, which makes them unreadable by php. If you open such a file you’ll see a pile of gibberish, and accordingly the browser will show an error, with the CMS functionality left incomplete.
Page with the available loaders: http://www.ioncube.com/loaders.php
Depending on your php version, your server’s OS, and its architecture, you pick the right file to download.
I’ll walk through installing ionCube Loader on CentOS linux x64.
You can find out the linux version by running this command:
cat /etc/issue
The php version will show up after running this command:
php -v
OS architecture:
uname -i
In my case:
- php 5.4.6
- CentOS 5
- x86_64
I’ll download the tar archive for Linux (64 bits), version 4.6.1:
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
tar xf ioncube_loaders_lin_x86-64.tar.gz
cd ioncube
The iocube folder will have a list of files - extensions for different php versions. For version 5.4.6 we need ioncube_loader_lin_5.4.so
Find the folder where php extensions are stored:
php -i |grep extension_dir
In my case it’s /usr/lib/php5/20100525
Copy the file we need into it:
cp ioncube_loader_lin_5.4.so /usr/lib/php5/20100525/
Make the change in php.ini.
echo `zend_extension = /usr/lib/php5/20100525/ioncube_loader_lin_5.4.so` >> /etc/php.ini
Restart apache.