Install eAccelerator on PHP 5.3

To install eAccelerator, use the following command sequence;

tar -xjf eaccelerator-0.9.6-rc1.tar.bz2 -C /usr/local/
cd /usr/local/eaccelerator-0.9.6-rc1/
make && make install

To install the shared extensions:

To search for the absolute path of the php.ini file

php -i | grep ini
Configuration File (php.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/php.ini

Then edit php.ini file

vi /usr/local/lib/php.ini
; make sure this option is uncommented
; extension_dir = "./" < << ; so it looks like this: ; extension_dir = "/" ; ; Then add the configuration like : ; zend_extension="/usr/local/lib/php/extensions/no-debug-non-zts-20090626/" 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="1" eaccelerator.compress="1" eaccelerator.compress_level="9"

Make the cache directory

mkdir /tmp/eaccelerator
chmod 777 /tmp/eaccelerator/

Restart Apache

/etc/init.d/apache restart


service apache restart


[ root: ~ ]# /usr/local/apache2/bin/apachectl stop
[ root: ~ ]# /usr/local/apache2/bin/apachectl start


php -v
PHP 5.3.0 (cli) (built: Nov 1 2009 22:38:48)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.6-rc1, Copyright (c) 2004-2007 eAccelerator, by eAccelerator

or you can use phpinfo.php and check this out in web browser. Create the file in the account directory or www/public_html root folder using vi/m or nano

vi /usr/local/apache2/htdocs/info.php

# Add this line:
< ?php phpinfo(); ?>

you should see the eAccelerator info
“with eAccelerator v0.9.6-rc1, Copyright (c) 2004-2007 eAccelerator, by eAccelerator” in the phpinfo.php under the Zend extension section.


I am a g33k, Linux blogger, developer, student and Tech Writer for My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.