Monday, April 18, 2011

Zend Optimizer

Zend Optimizer

  • To install Zend Optimizer, it's best is to download from http://www.zend.com/en/products/guard/downloads . Be aware you will need to register an account to be able to download it. After a few browsing and searching, get this ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz OR ZendOptimizer-3.3.9-linux-glibc23-x86_64.tar.gz
  • Extract it :
tar -zxvf ZendOptimizer-3.3.9-linux-glibc23-i386.tar.gz
  • Then copy it to php modules folder:
cp ZendOptimizer-3.3.9-linux-glibc23-i386/data/5_2_x_comp/ZendOptimizer.so /usr/lib/php/modules/ 
(if that is 32bit machine)
  • Create a file /etc/php.d/zend.ini, put this in:
zend_extension=/usr/lib/php/modules/ZendOptimizer.so
  • Restart apache
/etc/init.d/httpd restart
  • Now it should work. Try doing a
php -i |grep -i zend
to get the following result. This mean Zend is running
/etc/php.d/zend.ini,
Zend Extension => 220060519
Zend Memory Manager => enabled
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
    with Zend Optimizer v3.3.9, Copyright (c) 1998-2009, by Zend Technologies
report_zend_debug => Off => Off
zend.ze1_compatibility_mode => Off => Off
Zend Optimizer
Zend Loader => enabled
  • To test a encoded file, download ZendGuard from http://www.zend.com/en/products/guard/downloads , the latest is ZendGuard 5.5 which support php5.3, but it still could be used to encode php5.2. Just remember while encoded, choose php 5.2, since the ZendOptimzer we just installed only support until php5.2 (as at 2011-01-18)
  • Create a simple php script by putting
<?php echo 'this is encoded file' ?>
and encode it. It should be a binary if success encoded. Upload that file into the webserver and test whether you can get the exact output.

No comments:

Post a Comment