eAccelerator is a free open-source PHP accelerator & optimizer. 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.
eAccelerator stores compiled PHP scripts in shared memory and executes code directly from it. It creates locks only for a short time, while searching for a compiled PHP script in the cache, so one script can be executed simultaneously by several engines. Files that can’t fit in shared memory are cached on disk only.
The latest release, 0.9.6.1, features support for PHP 5.3 and also works with PHP 5.1 and 5.2.
update && apt-get upgrade &&
Now Install eAccelerator using the following commands:
tar -xvfj eaccelerator-0.9.6.1.tar.bz2
2. Integrate eAccelerator in PHP5:
In Debian Squeeze the configuration files for the PHP 5 modules are stored in the /etc/php5/conf.d directory.
Create eaccelerator.ini file :
Now ddd the following lines to /etc/php5/conf.d/eaccelerator.ini:
Now create the /var/cache/eaccelerator directory and make it writable:
mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator
3. Restart apache2:
NOTE: Create one file named phpinfo.php and put the following content in it:
Open phpinfo.php file in your browser. Now search for eAccelerator module.
You should now see eAccelerator mentioned on the page which means it has successfully been integrated and is working as expected.
You can also check if you can check if eAccelerator is running by executing:
When eAccelerator is loaded successfully you will see something like:
PHP 5.3.3-7+squeeze1 with Suhosin-Patch (cli) (built: Mar 18 2011 17:22:52)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator