UniServer Zend Optimizer
UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY
<span id="top"></span>
UniServer Zend Optimizer plugin for Uniform Server 4.*-Mona series
Some application encode PHP scripts using Zend Guard to run these scripts on Uniform Server requires the installation of Zend Optimizer.
This plugin provides a quick way to install Zend Optimizer on Uniform Server Mona.
This page describes how to install Zend Optimizer and provides setup information for Uniform Server pre-installed as a service.
Download and Install
Options 1
- Download file UniServer_Zend_Optimizer_1.0.exe from Sourceforge
- Save it to folder UniServer.
- To extract files, double click on file UniServer_Zend_Optimizer_1.0.exe, no need to change the path.
- If you wish to save space delete UniServer_Zend_Optimizer_1.0.exe
Options 2
- Download file UniServer_Zend_Optimizer_1.0.exe from Sourceforge
- Save to any folder (e.g. temp1)
- Extract files, navigate to zendOptimizer
- Copy zendOptimizer to folder UniServer\udrive\usr\local\php
- If you wish to save space delete temp1
Folder Structure
Once installed the folder structure for Zend Optimizer looks like this:
- UniServer\udrive\usr\local\php\zendOptimizer
- UniServer\udrive\usr\local\php\zendOptimizer\docs
- UniServer\udrive\usr\local\php\zendOptimizer\lib
- UniServer\udrive\usr\local\php\zendOptimizer\lib\Optimizer\php-5.2.x
Enable Zend Optimizer
Zend Optimizer needs to be enabled and configured in the php.ini file use either of the following two methods:
Option 1 - Use Script update
- Stop servers
- Navigate to folder: UniServer\udrive\usr\local\php\zendOptimizer
- Double click on Update_PHP_ini.bat
- Restart servers
Optrion 2 - Manual method
- Stop servers
- Edit file UniServer\udrive\usr\local\php\php.ini
- Navigate to bottom of page and add this block:
<pre> [Zend] zend_extension_ts = /usr/local/php/zendOptimizer/lib/ZendExtensionManager.dll zend_extension_manager.optimizer_ts = /usr/local/php/zendOptimizer/lib/Optimizer zend_optimizer.enable_loader = 1 zend_optimizer.optimization_level=15 </pre> Top
Testing
Testing is straight forward:
- Restart servers.
- From Apanel, run phpinfo()
- Scroll down page and look for this section:
<pre>
This program makes use of the Zend Scripting Language Engine: Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies
</pre> Zend Optimizer v3.3.3 confirms correct installation.
General notes
Note 1:
If you are not using encoded PHP files change this line:
- zend_optimizer.enable_loader = 1
To
- zend_optimizer.enable_loader = 0
It gives a small increase in speed.
Note 2:
If you have pre-installed Uniform Server as a service Zend Optimizer installation is identical to the above.
However you must edit php.ini manually and set the paths in the [Zend] block as shown below: <pre> [Zend] zend_extension_ts = c:/UniServer/usr/local/php/zendOptimizer/lib/ZendExtensionManager.dll zend_extension_manager.optimizer_ts = c:/UniServer/usr/local/php/zendOptimizer/lib/Optimizer zend_optimizer.enable_loader = 1 zend_optimizer.optimization_level=15 </pre> If you have moved the servers to a different location replace c:/UniServer with the new drive letter and folder name.
The above does not apply to a clean install of Uniform Server and Zend Optimizer plugin. The paths are automatically updated when you install Uniform Server plus Zend Optimizer as a service.
Summary
If your application uses scripts encoded by Zend Guard. I have show how easy it to install Zend Optimizer on Uniform Server allowing these scripts to be run.
If you are looking for a script accelerator you now have the ability to compare both eAccelerator and Zend Optimizer. I found when running Uniform Server from a USB memory stick eAccelerator outperforms Zend Optimizer. That said under high traffic loads Zend Optimizer is reputably faster.