Zend Optimizer is a PHP extension and can be used to run PHP scripts that are encoded with Zend Guard. Zend Optimizer is compatible with PHP 5.2. If you are running PHP 5.3 or above you should use Zend Guard, which is an analogue of Zend Optimizer. In this article I will go through the steps you need to follow when installing Zend Guard on popular Linux distributions like Centos 6, Debian, Ubuntu.
1. First you need to know the linux distribution, it’s architecture, and the PHP version you are using.
- To find the linux distribution, type cat /etc/issue in terminal.
- To find the architecture of your system, type uname -a in terminal.
- To find the php version, type php -v in terminal.
2. Download the appropriate Zend Gard
- For 32-bit operating systems :
1wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz - For 64-bit operating systems :
1wget http://downloads.zend.com/guard/5.5.0/ZendGuardLoader-php-5.3-linux-glibc23-x86_64.tar.gz
3. Un-tar the downloaded archive
-
1tar -zxvf ZendGuardLoader-php-5.3-linux-glibc23-i386.tar.gz
4. Move ZendGuardLoader.so to an appropriate location
-
1cp ZendGuardLoader-php-5.3-linux-glibc23-i386/php-5.3.x/ZendGuardLoader.so /usr/lib/php5/
5. Specify zend_extension in the php.ini file
-
12[Zend]zend_extension=/usr/lib/php5/ZendGuardLoader.so
6. Restart the web-server
- In Debian / Ubunu
1service apache2 restart - In Centos
1/etc/init.d/httpd restart
7. Check whether the module loads properly
-
12345php -m[PHP Modules]...[Zend Modules]Zend Guard Loader
8. Done 🙂