How can I Enable Zend Optimizer (php4/5) on the (gs) Grid-Service?
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:
- Log in to your (gs) Grid-Service via SSH (KB: (gs) Enabling SSH Access)
- 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 s#####.gridserver.com
PHP5: http://s#####.gridserver.com/gs-bin/phpinfo.php5
Whereis replaced by your actual site number.
- 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.
- You should now have Zend Optimizers installed for both PHP4 and PHP5. There is no need for an Apache restart.
- Check your php info from the AccountCenter to verify Zend has been enabled.
Revisions:
07-20-2009: Minor Fixes
Fields marked with an asterisk(*) are required. Comment on this article