PHP Accelerator

January 2nd, 2009 Category: PHP/MySQL

If you have running a webserver with many PHP pages I recommend to use a PHP accelerator like eaccelerator. Installation is really easy:

  • Download the source
  • Unpack the source and change to the unpacked directory
  • run “phpize”
  • run “./configure”
  • run “make”
  • run “make install”
  • run ‘”mkdir /tmp/eaccelerator”
  • run “chmod 0777 /tmp/eaccelerator”
  • edit “/etc/php5/apache2/php.ini” (e.g. on Debian Etch)
[eAccelerator]
extension="eaccelerator.so"
eaccelerator.shm_size="128"
eaccelerator.cache_dir="/tmp/eaccelerator/"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
  • restart apache “/etc/init.d/apache2 restart”

In my example the shm_size has been set to 128 MByte because the server hosts serveral domains with PHP pages.

Share and Enjoy:
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Webnews
  • MisterWong
  • Y!GG
  • Facebook
  • Furl
  • Google Bookmarks
  • Live-MSN
  • Readster
  • YahooMyWeb

Related posts:

  1. Simple PHP Flood Protection Class
  2. Howto Beautify Ugly .PHP URL’s
  3. Howto Restart Apache Graceful
  4. Disable WordPress Admin Bar
This entry was posted on Friday, January 2nd, 2009 and is filed under PHP/MySQL. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply