ZendOptimizer+ For PHP 5.3.x

Zend Optimizer is available for php 5.3, but still no support in EasyApache. ZendGuardLoader and ZendOPtimizer are two different extensions and both of them can run Zend encoded files, but the difference is that “Optimizer” have additional opcode acceleration. ZendOptimizerPlus.so is used for PHP 5.3 encoding and is not officially released. If anyone need ZendOptimizer with PHP 5.3.x, we can install it using following steps.

1. Install p7zip

# yum install p7zipu

You may need to install RPMForge to work the above command

2. Download ZendServerCE, untar it and then unpack zend.7z:

# wget http://downloads.zend.com/zendserver/5.0.3/ZendServer-CE-php-5.3.3-5.0.3-linux-glibc23-i386.tar.gz
# tar xzvf ZendServer-CE-php-5.3.3-5.0.3-linux-glibc23-i386.tar.gz
# cd ZendServer*
# /usr/libexec/p7zip/7za e zend.7z -d zend.7z
for x64 use this file
# wget http://downloads.zend.com/zendserver/5.0.3/ZendServer-CE-php-5.3.3-5.0.3-linux-glibc23-x86_64.tar.gz

4. Now copy ZendOptimizerPlus.so to /usr/local/Zend53
mkdir /usr/local/Zend53
cp zend/lib/optimizerplus/php-5.3.x/ZendOptimizerPlus.so /usr/local/Zend53

4.Add below code to php.ini


; Optimizer+ On/Off switch. When set to Off, code is not optimized.

; If set to On, use the current directory as a part of the script key

; If enabled, the Optimizer+ checks the file timestamps and updates the cache accordingly.

; How often to check file timestamps for changes to the shared memory storage allocation. (units: seconds)

; Enables or disables file search in include_path optimization

; The verbosity of the Optimizer+ log

; The Optimizer+ shared memory storage size. The amount of memory for storing precompiled PHP code in Mbytes. (units: MBytes)

; The maximum number of keys (scripts) in the Optimizer+ hash table

; The maximum percentage of “wasted” memory until a restart is scheduled (units: %)

; Check the cache checksum each N requests

; How long to wait (in seconds) for a scheduled restart to begin if the cache is not being accessed (units: seconds)

; The location of the Optimizer+ blacklist file

; If enabled, a fast shutdown sequence is used for the accelerated code

; A bitmask, where each bit enables or disables the appropriate Optimizer+ passes

; Enables or disables the optimization passes that may take significant time, based on an internal runtime calculation

And finally you get Zend Optimizer installed:

[~]# php -v
PHP 5.3.10 (cli) (built: Mar 27 2012 00:14:05)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologies
with the ionCube PHP Loader v4.0.12, Copyright (c) 2002-2011, by ionCube Ltd., and
with Zend Optimizer+ v4.1, Copyright (c) 1999-2010, by Zend Technologies

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: