Parallels H-Sphere Documentation System Administrator Guide

 

Zend Optimizer Installation

 

Last modified: 27 Dec 2007

 

WARNING: This documentation covers Parallels H-Sphere versions up to 3.1. For the latest up-to-date Parallels H-Sphere documentation, please proceed to the official Parallels site.

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%.

  1. 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.
  2. Login to your web box where Zend Optimizer has to be installed.
  3. For Zend installation, you must have the file php.ini in the directory:
    - /usr/local/lib/ - for H-Sphere before 2.5
    - ~httpd/conf/php4/php.ini or ~httpd/conf/php5/php.ini for H-Sphere 2.5+. ~httpd/conf/php.ini links to the file corresponding to php version being active.
    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.
  4. 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.
  5. 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
  6. 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 for H-Sphere before 2.5 and ~httpd/conf/php4/php.ini or ~httpd/conf/php5/php.ini for H-Sphere 2.5+). Follow the further instructions.
  7. Finally, the installer would suggest to restart Apache. You must do it either directly from the installer or manually after the installation.
  8. 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
  9. 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

  10. If one of the given items was not enabled, contact Zend Optimizer support.


© Copyright 2017. Parallels Holdings. All rights reserved.