Enabling ZendOptimization, APC or eAccelerator

Following are the instructions for enabling any of the PHP caching mechanisms to performance boost your site.

APC

To enable APC the following changes should be made, add the following lines to ~/.php/php.ini:

# Load the APC extension
extension=/opt/php/extensions/20060613/apc.so

[apc]
apc.enable = 1

Note: the full path to apc.so isn't strictly required, but if you have installed any custom PECL extensions the extension_dir directive will be updated in ~/.php/php.ini and having a full pathname to the APC extension will ensure that the APC extension will be loaded.

apc.enabled is set to 1 by default, but it's better to specify it explicitly.

ZendOptimizer

To enabled ZendOptimizer the following lines should be added to ~/.php/php.ini:

# Load and enable ZendOptimizer
zend_extension=/opt/php/extensions/20060613/ZendOptimizer.so

Please note that ZendOptimizer and APC aren't working nicely with each other, so you need to ensure that only one of them are enabled at a time.

eAccelerator

To enable eAccelerator the following lines should be added to ~/.php/php.ini:

# Load the eAccelerator extension
extension=/opt/php/extensions/20060613/eaccelerator.so

[eaccelerator]
eaccelerator.enable = 1

Notes: the same notes as for APC apply here. Additionally, it should be mentioned that although eAccelerator can work together with ZendOptimizer there will be no speed boost, sometimes eAccelerator + ZendOptimizer is a bit slower than bare eAccelerator setups.

Also note that at the time of this writing http://eaccelerator.net is down (it was up on Dec 31th according to Google's cache) and more important is that WE servers don't have eAccelerator installed yet. We can install it if there is such a request, or you can install it yourself by using 'pecl install eaccelerator'.