eaccPHP eAccelerator is a free open source PHP accelerator, optimizer and dynamic content cache module that specially build to optimize php performance. According to php eaccelerator official site, php accelerator able to speed up the php code by 1-10 times and reduce server load.

 

Installing PHP eAccelerator from source

Requirements

     * php4 or php5
    * autoconf
    * automake
    * libtool
    * m4 

eAccelerator only works with mod_php or php in fastcgi mode. It can’t be used in cgi or cli because eAccelerator needs to set up shared memory, and this can only be done when all php instances that need to access it are forks of the first process.

 

Installation
download  eAccelerator

Download the tarball file from the source  

cd /usr/local/src/
mkdir eacp
cd eacp
wget
http://bart.eaccelerator.net/source/0.9.5.2/eaccelerator-0.9.5.2.tar.bz2
bunzip2 eaccelerator-0.9.5.2.tar.bz2
tar xvf eaccelerator-0.9.5.2.tar
cd eaccelerator-0.9.5.2 



 Compiling eAccelerator 

 

When you have more then one php install or the phpize and php-config scripts aren’t in your path then you should follow this procedure
This example has php installed in /usr/bin/php (command to know the path – which php), this is the path of the –prefix option given to the php configuration script.

export PHP_PREFIX=”/usr/”
$PHP_PREFIX/bin/phpize

./configure –enable-eaccelerator=shared –with-php-config=$PHP_PREFIX/bin/php-config –with-eaccelerator-info

make
make install

copy the all php files under the eaccelerator-0.9.5.2 directory to the document root of server

cp *.php /usr/local/apache/htdocs/eacp

Configuring eAccelerator

 

eAccelerator can be installed both as Zend or PHP extension. When you install eAccelerator as a zend_extension you need to give the full path to the eaccelerator.so library.

To install as Zend extension: Add the follwing lines below the zend entries in the php.in file

 

 

 

/scripts/restartsrv_httpd

 Verify if eAccelerator works


php -v 


eaccelerator.allowed_admin_path=”/usr/local/apache/htdocs/eacp”
zend_extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20020429/eaccelerator.so”
eaccelerator.shm_size=”16″
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 the httpd

/scripts/restartsrv_httpd

Verify if eAccelerator works 

php -v 

When eAccelerator is loaded successfully you will see something like:
————————————————————————————————
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with eAccelerator v0.9.5-beta2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
————————————————————————————————
or check with phpinfo page

Using Web contrlol panel of eAccelerator

browse the pages under the default document root

http://default.domain.com/eacp/control.php


Finished