Support / KnowledgeBase

 
Search the KnowledgeBase Search

How can I Enable Zend Optimizer (php4/5) on the (gs) Grid-Service?

  • Applies to: (gs)

  • Difficulty: Easy

  • Time needed: 5 minutes

  • Tools needed: None

 

The (gs) Grid-Service comes with support for the Zend Optimizer and is fully ready to use when you get the server. As this is a very flexible system, users may choose to implement custom directives through the means of a custom php.ini file. In such cases as these, the Zend Optimizer functionality will break. This article is for the purpose of properly adding the correct directives to a user's custom php.ini file to make the Zend Optimizer libraries once again load properly and function. 


Things you will need:
  • SSH access to your server.
  • Your serveradmin@domain.com password
  • The ability to use command line text editors like 'vi'

Instructions:

  1. Log in to your (gs) Grid-Service via SSH (KB: (gs) Enabling SSH Access)

  2. Get a list of all PHP versions installed on the system:

    ls /usr/local/ | grep php- 


    Make a note of the specific version you need the Zend Optimizer installed for. You may check the right version of PHP to use by using the following URLs:

    PHP4: http://s#####.gridserver.com/gs-bin/phpinfo.php4
    PHP5: http://s#####.gridserver.com/gs-bin/phpinfo.php5

    Where
    s#####.gridserver.com is replaced by your actual site number.

  3. Open your php.ini file for editing (KB: (gs) HOWTO: edit php.ini). Add these lines:

    For PHP4 (Replace the x.x-x with the version number you want to use.)
    zend_optimizer.optimization_level=15
    zend_extension="/usr/local/php-4.x.x-x/zend/ZendOptimizer.so" 

    For PHP5 (Replace the x.x-x with the version number you want to use.)
    zend_optimizer.optimization_level=15
    zend_extension="/usr/local/php-5.x.x-x/zend/ZendOptimizer.so" 

    Save the changes and quit.

  4. You should now have Zend Optimizers installed for both PHP4 and PHP5. There is no need for an Apache restart.

  5. Check your php info from the AccountCenter to verify Zend has been enabled.

Revisions:

07-20-2009: Minor Fixes


User Comments

No visitor comments posted. Post a comment

Fields marked with an asterisk(*) are required. Comment on this article

Fill out the form below if you would like to comment on this article.
 
 
 

(code is not case-sensitive)
 
Submit
 
 

Continue