Installing ZendOptimzer on FreeBSD

ZendOptimzer is free which  runs the files encoded by the Zend Encoder and Zend SafeGuard Suite. It can also speed up the php application by its caching feature.

 

Installing the ZendOptimizer

 

You can make use of the port in FreeBSD to install  it. Ssh your server as root user and add the pack using

 

  • # pkg_add -r ZendOptimizer

 

If its already added you can proceed with

 

  • cd /usr/ports/devel/ZendOptimizer/
  • make install clean

 

After installing you need to edit your php.ini and add the following lines (below lines are just an example you need to add the lines which displays after the make install clean ).

 

[Zend]
zend_extension=”/usr/local/ioncube/ioncube_loader_fre_5.2.so”
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer=”/usr/local/lib/php/20060613/Optimizer”
zend_extension_manager.optimizer_ts=”/usr/local/lib/php/20060613/Optimizer_TS”
zend_extension=”/usr/local/lib/php/20060613/ZendExtensionManager.so”
zend_extension_ts=”/usr/local/lib/php/20060613/ZendExtensionManager_TS.so”

 

Restart your apache or nginx web server to load with the new settings.

 

NOTE : If you are getting “Segmentation Fault (Core Dumps)” while executing php -v . You need to remove all the zend line and just have to add the two lines below to fix the problem.

 

[Zend]

zend_extension=”/usr/local/lib/php/20060613/Optimizer/php-5.2.x/ZendOptimizer.so”
zend_extension=”/usr/local/lib/php/20060613/ZendExtensionManager.so”

Change the paths according to your installed locations.