Comments on Integrating eAccelerator Into PHP5 And Lighttpd (Debian Lenny)

Integrating eAccelerator Into PHP5 And Lighttpd (Debian Lenny) This guide explains how to integrate eAccelerator into PHP5 and lighttpd on a Debian Lenny system. From the eAccelerator project page: "eAccelerator is a free open-source PHP accelerator, optimizer, and dynamic content cache. It increases the performance of PHP scripts by caching them in their compiled state, so that the overhead of compiling is almost completely eliminated. It also optimizes scripts to speed up their execution. eAccelerator typically reduces server load and increases the speed of your PHP code by 1-10 times."

3 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Borderamigos

This seems to work fine on Apache2 as well.  Thanks again.

 

By: Michael.Terence

Hey falko, with eaccelerator 0.9.5.3 they disabled some of the better performing enhancements by default as there are concerns that if a host isn't using suphp, or php-suexec other users can read from shared memory.  This is how I build it (for LiteSpeed) after compiling php5 via the web interface.

cd /usr/local/lsws/phpbuild/php-5.2.9/eaccelerator-0.9.5.3/

make clean

export PHP_PREFIX="/usr/local/lsws/lsphp5"

$PHP_PREFIX/bin/phpize

./configure --with-eaccelerator-shared-memory --with-eaccelerator-sessions --with-eaccelerator-content-caching --with-php-config=$PHP_PREFIX/bin/php-config

make

make install

I also modify the storage location and store the files in /dev/shm which offers yet another signifigant speed enhancement.  be sure to set ttl, etc or your shm will fill up... you can also use a cron to clear it out every so often.  --  this is for a box with way more ram than a small VPS... doing it on a VPS with a whole bunch of PHP scripts could cause trouble... especially if you're running apache and mysql.

By: Anonymous

These instructions were VERY helpful and worked flawlessly. I use horde and apache2 and this makes it run much faster. Adding the eaccelerator control panel is something that I sometimes find helpful.