Scope: Zend Optimizer™ User Guide
Scope: Zend Optimizer™ User Guide
Zend Optimizer™
User Guide
Scope
The Zend Optimizer™ boosts PHP performance by going over the intermediate code
generated by the standard Zend run-time compiler and optimizing it for faster execution.
In addition, it enables PHP installations to read Zend Intermediate Code files that were
encoded by the Zend Encoder™ (zendenc) and the Zend SafeGuard Suite™.
The Zend Optimizer is available free of charge, at the Zend Store.
The Zend Optimizer supports the following platforms:
- Solaris®/sparc 2.6 or later
- Linux® (i386/glibc 2.1 / 2.2 / 2.3 and libc5)
- FreeBSD 3.4
- FreeBSD 4.x/5.x
- Microsoft® Windows® NT 4.0, Windows 2000 and Windows XP
- Mac OSX
In addition, Zend provides unsupported builds of the Zend Optimizer for the following
platforms:
- OpenBSD
- Net BSD
- AIX
- Solaris/x86 2.6 or later
This guide consists of the following main sections:
• System Requirements
• Installation
• Avoiding Incompatibilities
• Support
System Requirements
The Zend Optimizer has no special system requirements, except that a compatible version
of PHP 4.x must be installed. For further information, see Avoiding Incompatibilities or
review the Product Compatibility Table.
Installation
It is recommended that after installing the Zend Optimizer, you make sure that the
installation was successful (see Checking for Successful Installation.)
The Zend Optimizer runs within the framework of PHP. It optimizes your PHP scripts
automatically, and transparently detects and loads encoded files.
./install.sh
2. If you are running under Apache, restart your Apache Web server. For Apache V1.3,
use the commands:
OpenBSD, Solaris/x86
2. The unzipped files is placed in a directory with the same name as the package but
without the .tar.gz suffix.
Copy the ZendOptimizer.so file to your system. It is suggested to copy into the
directory /usr/local/Zend/lib.
3. Add the following lines to your php.ini file (preferably into /usr/local/lib).
Do not add any extra spaces or tabs:
zend_optimizer.optimization_level=15
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
Windows
1. To ensure that your PHP installation is compatible with the Zend Optimizer, it is
recommended to use the Windows packages posted in the Zend Store which are
compiled in non-debug mode The Zend Optimizer works only with non-debug PHP
binaries.
2. The Zend Optimizer for Windows package is a self-extracting installer. Simply run
the package file, and follow the installation instructions.
3. If you are running a server module (e.g. ISAPI), restart your server. For Microsoft
IIS, run net stop iisadmin, and then net start w3svc, from a command line console.
<?php
phpinfo();
?>
The part of the output where the Zend Optimizer is listed looks similar to this:
Avoiding Incompatibilities
This section discusses two possible incompatibilities that should be avoided when using
the Zend Optimizer.
Support
For further information on the Zend Optimizer, visit the online Optimizer forum.
Zend SOS subscribers can also submit support questions through Zend Support-Online
Services (SOS). To do so, go to the Pickup Depot, fill in our convenient form, and submit.
Our worldwide team of experts will respond promptly. Track the status of your incident
anytime through Zend SOS.
For issues other than technical support, email us at [email protected].