Installation Of ZendOptimizer And IonCubeLoader Using Lighttpd On CentOS
This tutorial explains how to enable ZendOptimizer and IonCubeLoader in PHP on a Lighttpd web server on CentOS.
What is Ioncube Loader?
IonCube loader is the PHP extension that decodes encrypted PHP files on runtime. It is freely available and installation is very easy.
What is Zend Optimizer?
The Zend Optimizer is a free runtime application that enables PHP to run the files encoded by the Zend Guard. This can be freely used by anyone looking to run encoded applications. Please download and follow the installation instructions included in the distributions.
Install IonCube Loader
Get the latest version of the ionCube Loader from http://www.ioncube.com/loaders.php.
1. Download Ioncube Loader
[root@server ~]# cd /tmp
[root@server ~]# wget http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz
[root@server ~]# cd ioncube/
[root@server ioncube]# mkdir /usr/local/lib/ioncube
[root@server ~]# mv ioncube_loader_lin_5.0.so /usr/local/lib/ioncube/
2. Now edit /etc/php.ini
Add this line right at the beginning:
[root@rhesa ~]# nano /etc/php.ini
[PHP] zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.0.so
Zend Optimizer
Get the latest version of the Zend Optimizer from http://www.zend.com/en/products/guard/downloads and save it in your /tmp directory.
1. Download Zend Optimizer
[root@server ~]# cd /tmp/
[root@server tmp]# tar zxvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz.gz
[root@server ~]# cd ZendOptimizer-3.3.3-linux-glibc23-i386/data/5_0_x_comp/
[root@server 5_0_x_comp]# mkdir /usr/local/lib/Zend
[root@server 5_0_x_comp]# mv ZendOptimizer.so /usr/local/lib/Zend/
2. Now edit /etc/php.ini
Add this line right at the beginning:
[root@server ~]# nano /etc/php.ini
[PHP] zend_extension=/usr/local/lib/ioncube/ioncube_loader_lin_5.0.so zend_extension=/usr/local/lib/Zend/ZendOptimizer.so zend_optimizer.optimization_level=15
Restart lighttpd:
[root@server ~]# /etc/init.d/lighttpd restart
The extension should now be visible in the output of the phpinfo(); PHP function.