From what I can tell eAccelerator is the best free php accelerator.

Here are my notes on how to set the control variables (in php.ini):

;linux 2.6 has 32meg limit. If you have the memory and lots of modules try to set even higher e.g to 64
eaccelerator.shm_size="32"

; people have suggested that putting this directory on a fast separate disk will help
; you shouldn't be generating that much activity on this disk anyway because of the shared memory configured above
eaccelerator.cache_dir="/Applications/MAMP/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"

; You can set this to 0 for production sites. 1 means checks modification times so you don't need to restart web server
; if you are editing your php. You aren't editing php scripts on live sites are you?
eaccelerator.check_mtime="1"

eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="3600"
eaccelerator.shm_prune_period="0"

; set this to 1 if you want to just use the memory cache: good if you have configured a large one
eaccelerator.shm_only="0"

eaccelerator.compress="1"
eaccelerator.compress_level="9"

Comments

venkat-rk’s picture

It appears that if php is running as cgi (instead of as mod_php- that is, an apache module), eaccelerator will not work even if it is installed. Meaning, no code will be cached. Is this correct?

----
Previously user Ramdak.

chrisd’s picture

That is correct.

eAccelerator works by caching the php page. If the handle to eAccelerator is released, so is the cache content. eAccelerator "can't live" without a main application loaded. All PHP accelerators (caching extensions) follow that rule. One solution is to run PHP in FASTCGI mode (a sort of mixture of mod and cgi or CGI with a persistency that you can configure). I actually run www.sitebuddy.com ( the only source of Windows binaries of the major PHP accelerators) in FASTCGI mode. Here is a quick article a wrote little while back on the issue:
http://www.sitebuddy.com/php/php_apache_fast_cgi_install

Cheers,
Chris
Take a break: Guide to France

Gene Steinberg’s picture

I see that eAccelerator is incorporated in cPanel's Easy :: Apache feature. Are there special things you need to know before compiling, options to eliminate, etc?

Peace,
Gene Steinberg

tkcent’s picture

As of 0.9.6 they have removed the shared memory caching. The opcode cache is still there but you won't be able to use other modules like Cache Router.

http://groups.google.com/group/eaccelerator/browse_thread/thread/b66c9ca...

cookiesunshinex’s picture

I looked at the thread that you linked to, and I looked at the cacherouter module and I'm wondering where you get the information that eAcellerator 0.9.6 won't work with Cache Router?

I'm using eaccelerator-0.9.6-rc1

Can you explain your post a bit further and provide references?

With WHM/Cpanel, EasyApache3, and Apache 2.2.x, you don't have a choice of which version of eAcellerator to use, it automatically installs the latest version which is 0.9.6-rc1

tkcent’s picture

Sorry, its been awhile since I looked at this, but this other issue should have more information.

http://drupal.org/node/572870

Duplika’s picture

I'd like to know the same, and if it's better to use Cache Router with latest eAccelerator installed or not.