The Zend ionCube Loader is basically used to “decrypt” (or better, de-ionCube) PHP scripts and files that were originally encoded with separate encoding software – as means of either copy protection (primarily) or the inability to browse the source code for back doors and security flaws. It’s by no means a secure method in protecting your code, though it should serve the purpose of prevention in a similar manner as the deadbolt on your front door.
In any case, rather than jumping through a few hoops; you’re here to find out how to install Zend ionCube Loader for PHP on your Linux system.
First you’ll want to head on over and find the proper ionCube Loader for your architecture.
Now you’ll want to use the url and download the current tarball for your architecture. We’re using 64 bit Linux in this example, please choose yours accordingly.
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz
Next, simply extract the tarball.
# tar -zxvf ioncube_loaders_lin_x86-64.tar.gz
You can either move the individual loader you need to a system directory or move the entire directory that was extracted. You may have a personal preference to where you might like to put these files other then /usr/local/lib.
# sudo mv ioncube/ /usr/local/lib/
Once the ionCube loaders are in their final location, edit your php.ini file and add the following line (replacing with the proper version number of course):
# sudo nano /etc/php5/apache2/php.ini zend_extension="/usr/local/lib/ioncube/ioncube_loader_lin_x.x.so"
All that’s left is to restart Apache and installation is now complete.
# sudo /etc/init.d/apache2 restart