High Performance/Traffic PHP WebServer - PHP Caching (eaccelerator)

Status
Not open for further replies.

Bharat

Active Member
1,973
2010
840
240
eAccelerator is a PHP caching system, which caches frequently used portions of PHP files to RAM to increase performance. This is especially great on high traffic websites such as forums. Performance gains of up to 1000% have been seen with eAccelerator. The following tutorial shows how to install eAccelerator from source on Linux.


Download the source:


Code:
cd /usr/src/
  wget http://internap.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.3.tar.gz
  tar zxvf eaccelerator-0.9.3.tar.gz
  cd eaccelerator-0.9.3


Build:


Code:
export PHP_PREFIX="/usr"
  $PHP_PREFIX/bin/phpize
  ./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
  make


Note, the PHP_PREFIX should be set to where you have PHP installed.




Install:


Code:
make install


If you are using Zend, add the following to your php.ini file:




Code:
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"


Note: zend_extension should be equal to the location to where the extension was installed.

If you are not using Zend, you can load eAccelerator as a PHP extension:


Code:
extension="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"
       Setup caching directories:
       mkdir /tmp/eaccelerator
      chmod 0777 /tmp/eaccelerator

You can copy the eaccelerator.php file to a web accessible location, and check if eAccelerator is running.
 
7 comments
When I use the command "phpize"

Cannot find build files at '/usr/lib64/php/build'. Please check your PHP install

Please help me!
 
nah don't think u can make an turbo rapidleech from it , its just an caching system , not a downloader for php programs ..
 
Status
Not open for further replies.
Back
Top