Zend OptimizerTM User Guide
This section describes the Zend Optimizer installation procedures for all-compatible Operating Systems.
Note:
After installing the Zend Optimizer, check whether the installation was successfully completed (see Checking for Successful Installation.)
The Zend Optimizer is a free package that can be downloaded from zend.com. To download and install the Zend Optimizer:
1. Log in or register with your Zend account.
The Zend Optimizer – Free Download page opens.
2. Select the Optimizer version that corresponds with the platform system you use and select “Download Now”.
The File Download dialog opens.
3. Choose the Save option and save the selected file to your local system.
From this point the installation instructions differ according to the operating system on which you would like to install the Zend Optimizer
To install the Zend Optimizer on Windows:
1. Double click on the package ZendOptimizer-x.x.x-windows-i386.exe The Optimizer Install Shield opens.
2. Follow the instructions in the Installer.
These instructions define the basic system configurations necessary for installing the Zend Optimizer such as the Web Server in use and the location of the php.ini.
You can now jump to the section: Installation Verification, page 4 for instructions on how to confirm the Zend Optimizer was successfully installed.
To install the Zend Optimizer on Unix Variants:
Open a terminal window and change dir to the directory in which the Zend 1. Optimizer package was saved.
To untar the package use the command:
gunzip -c <package name> | tar xf -
2.From the extracted package's directory, type the following command: ./install. The installer is launched
3.Follow the instructions in the installer.
These instructions define the basic system configurations necessary for installing the Zend Optimizer, such as the Web Server in use and the location of the php.ini.
3
Zend OptimizerTM User Guide
4.If for some reason, the graphical installation will not start or is illegible, use the command: ./install-tty which is useful on low-end terminals such as when installing on a remote server via SSH/Telnet.".
The text only installation starts.
Important note:
To install or uninstall Zend Optimizer, you must be logged in with administrator/root permissions.
Uninstall
Windows
In order to uninstall Optimizer:
1. Double click on the uninstaller icon, which is located at Control Panel -> Add/Remove Programs and select Zend Optimizer.
Unix Variants
In order to uninstall the Optimizer:
1. Replace the php.ini file with the backed up copy (php.ini-zend_optimizer.bak). 2. Delete the Optimizer installation directory.
3. Restart the Web Server.
Important note:
If you have other Zend products installed under the same directory, do not delete the installation directory. In this case, you should only change the php.ini file.
Installation Verification
This program makes use of the Zend scripting language engine.
Use the PHP function: phpinfo() to verify a successful installation, as shown in the following script:
<?php
phpinfo();
?>
The part of the output where the Zend Optimizer is listed looks similar to this:
Zend Engine vX.Y.Z, copyright (c) 1998-2006, Zend Technologies
Ltd.,
with the Zend Optimizer vX.Y.Z, copyright (c) 1998-2006 Zend
Technologies Ltd.
4
Zend OptimizerTM User Guide
This section discusses the possible incompatibilities that may arise and how they can be can be prevented/resolved in order to properly activate and use the Zend Optimizer.
Limiting Number of Concurrent Licenses and “Cookies”
When the “Require Cookies” option is NOT selected, any page can be loaded, once, from any number of browsers concurrently even when the number of concurrent users is limited (even to a single user).
This happens because – the first time that the page is accessed – no cookie is present. The second time that the page is accessed, a cookie *is* present (even though not required). The server then limits access.
In addition, if the “Require Cookies” option is NOT selected, AND the browser is set to not receive cookies, any page can be loaded, any number of times, from any number of browsers.
This happens because no cookie is present at any time. The server has no way to know that the page has been accessed.
PHP Version Incompatibility
The Zend Optimizer must be fully compatible with the PHP version installed. An incompatibility will cause the Zend Optimizer to fail and register an error message. (See message in the Web server log file). Make sure the file you downloaded corresponds with the installed PHP version. If necessary, uninstall the Zend Optimizer and download/install the version suitable for the PHP version in use.
Note:
Zend Optimizer 2.6 supports all recent PHP 4 and PHP 5 versions, not including non-released versions and old PHP versions (like 4.0.x).
Web Server Incompatibility
The Zend Optimizer must be fully compatible with the installed Web Server. An incompatibility will cause the Zend Optimizer to fail and write an error message to the log. Make sure the file you selected the proper web server in the installation process. If necessary, uninstall the Zend Optimizer and download/install the proper version.
Note:
The Zend Optimizer only runs with supported Web Servers.
Configuration Options
The Zend Optimizer will not run if the following PHP settings are enabled: Debug Mode - Check that your PHP was compiled in non-debug mode -
This can be checked by looking at the top part of the phpinfo() function output and checking "Debug Build" row (ZEND_DEBUG in older PHP versions) - it should say "no".
5
Zend OptimizerTM User Guide
Thread Safety - Check that your PHP was compiled in ZTS mode for Windows and non-ZTS mode for Unix. This can be checked by looking at the top part of the phpinfo() function and checking "Thread Safety" row - it should say "disabled" for Unix and "enabled" for Windows.
Enable Versioning - Check that your PHP was compiled without the Enable Versioning setting. This can be checked by looking at the top part of the phpinfo() function and checking to see if a row called "--enable- versioning" exists in the Configure Command section - if it does exists the PHP should be compiled without this option.
6
Zend OptimizerTM User Guide
Other PHP Extension Incompatibilities
Another reason for the Zend Optimizer not running could be due to extension incompatibility. This problem arises when the php.ini includes extensions from different sources that interfere or clash with the Zend Optimizer. As a general rule, any extension that is related to debugging or optimizing that has been added to the php.ini by a third party supplier, has the potential to disrupt the Zend Optimizer’s performance and should be disabled/removed.
Zend Guard Incompatibility
Files encoded with the Zend Guard must be compiled with compatible version of Zend Guard. When in doubt always use the latest version of Zend Optimizer.
If the versions of Zend Guard and Zend Optimizer are incompatible, the Optimizer will fail to run encoded files and will register an error message (Zend Optimizer not installed or General Optimizer error).
Note:
If you are using Zend Guard 4.0 and above, use the latest Zend Optimizer version.
7