DirectAdmin: Web control panel

PHP 5.2 (with Zend Optimizer)

by ross at 07:23:16 on October 28, 2011

Zend Optimizer

If you need to run Zend encoded sites you have to stick with DA default 5.2 version of PHP.

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

Edit /usr/local/lib/php.ini, add to the end:

[Zend]
zend_optimizer.optimization_level=0
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"

Yes, we turned off optimization. This optimizer is very old and as you know Zend discontinued support of FreeBSD, so no new versions are available. This crap is only good for running encoded binaries. But we have eAccelerator! Read on.

If you decide to not install eAccelerator then set zend_optimizer.optimization_level to 14.

Rebuilding PHP

If you ever need to rebuild PHP of DirectAdmin do the following (no need to do so after installing optimizers/cachers):

# cd /usr/local/directadmin/custombuild
# ./build clean
# ./build update
# ./build php

 

Comments