|
Zend Optimizer Installation in HSphere |
|
Zend Optimizer is a free application that runs files encoded by Zend Encoder, enhancing the running speed of PHP applications. This free application uses multi-pass code optimizations to speed up PHP applications. The increase in speed reduces CPU load for the server typically cutting latency time in by 20-50%. - To start the installation, you have to download Zend Optimizer. You can do that from the site www.zend.com/store/free_download.php?pid=13. You should have PHP version 4.1.0 or higher.
- Login to your web box where Zend Optimizer has to be installed.
- For Zend installation, you must have the file php.ini in the directory /usr/local/lib/. Since the distribution doesn't include this file, you have to copy php.ini to the directory specified above, or, place there a symlink to the php.ini in your PHP installation directory.
- Go to the directory where your Zend distribution is downloaded and extract it using the following command:
tar xzf Zend*****.tar.gz - the asterisks stand for any characters After executing this command, Zend Optimizer directory will be created. The exact name of this directory depends on the Zend version and system characters. - To proceed with the installation, enter the following commands:
cd Zendoptimizer*** (the asterisks stand for any characters) - move to the directory where your Zend lies ./install.sh - start Zend installation - Read the license carefully. If you agree, enter Yes, otherwise enter No. You will be asked to choose the directory where you want to install Zend (/usr/lib/Zend by default). The installer will also ask you of the Apache bin directory (it is by default /hsphere/shared/apache/bin) and of the location of php.ini (/usr/local/lib/php.ini). Follow the further instructions.
- Finally, the installer would suggest to restart Apache. You must do it either directly from the installer or manually after the installation.
- If apache crashes with a segmentation fault error, the most probable reason is that the file usr/local/lib/php.ini was created incorrectly. Open it with a text editor and remove all lines except the first five so php.ini file looks as follows:
zend_gui_password=your_encoded_zend_gui_password [PHP] zend_extension=/usr/local/Zend/lib/ZendOptimizer.so zend_optimizer.optimization_level=15 - Check if Zend was succefully installed by putting a php file with the following content to any directory of your site:
<? phpinfo(); ?> Then open this file in a browser. Zend Optimizer sections must appear. If your Zend Optimizer was installed successfully, the following items will be enabled: | Optimization Pass 1 | Enabled | | Optimization Pass 2 | Enabled | | Optimization Pass 3 | Enabled | | Zend Loader | Enabled |
- If one of the given items was not enabled, contact Zend Optimizer support.
|