IonCube is a proprietary PHP encoder and, therefore, a module or library of protection functions for PHP applications. IonCube converts the readable source code of PHP files into (unreadable) bytecode, thus achieving better performance. The so-called ionCubeLoader must be installed beforehand or loaded at the exact moment they are needed.
IonCube provides these loaders free of charge for almost all operating systems, including: Windows, Linux, FreeBSD, OS X or Solaris.
How it works is relatively easy to understand: the code is encrypted using a GUI (graphical user interface) that is quite simple and intuitive, then uploaded to the server, where it is decrypted using a php module and the final result is displayed.
It is important to create a snapshot of the server so you can restore it quickly if something goes wrong.
Steps to Install IonCube on Linux
- Access your server via SSH as the root user.
- Download the tar.gz archive containing the ion_cube installation files with the command:
# wget http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
- Extract the archive you just downloaded:
# tar -zxf ioncube_loaders_lin_x86-64.zip
- Move the directory resulting from the previous step to the PHP modules folder:
# mv ioncube /usr/lib/php/modules
- Change the folder permissions:
# chown -R root:root /usr/lib/php/modules/ioncube/
- Once the folder is in the correct directory, you must add the following line at the end of your server's php.ini file(s):
zend_extension=/usr/lib/php/modules/ioncube/ioncube_loader_lin_5.2.so - Finally, you only need to restart your web server. If you have a Plesk Linux server hosted at Clouding.io, you can do this with the command:
# /etc/init.d/apache2 restart
Or, depending on the distribution:# service httpd restart