Debian Tutorials

Debian Tutorials


Step by step tutorials showing you how to install and configure various applications and services on Debian based Linux distros.

October 2018
M T W T F S S
« Apr    
1234567
891011121314
15161718192021
22232425262728
293031  

Categories


Installing eAccelerator

Ástþór IPÁstþór IP

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 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.

1. Download the eAccelerator source. The latest version is mirrored on www.debiantutorials.com as it’s not available on the official site anymore.

cd /tmp
wget http://www.debiantutorials.com/static/eaccelerator-0.9.6.1.tar.bz2

2. Extract

tar -xvjf eaccelerator-0.9.6.1.tar.bz2

3. Install php5-dev

apt-get install php5-dev

3. Compile and install the eAccelerator

phpize
./configure
make
make install

4. Configure eAccelerator as PHP extension (create a new config file: pico /etc/php5/conf.d/eaccelerator.ini)

extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/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"

5. Create a cache directory

mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator

5. Restart apache

/etc/init.d/apache2 restart

Comments 1
  • Chris
    Posted on

    Chris Chris

    Author

    Hello, after setting up eaccelerator like above, i get on all vhosts the error:

    Warning: Unknown: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/httpd/user/domain.org/:/tmp/:/var/cache/eaccelerator/) in Unknown on line 0

    Warning: require() [function.require]: open_basedir restriction in effect. File() is not within the allowed path(s): (/home/httpd/user/domain.org/:/tmp/:/var/cache/eaccelerator/) in /home/httpd/user/domain.org/typo3_src-4.5.4/index.php on line 84

    I have also add /var/cache/eaccelerator/ to the open_basdir in all vhosts.

    Whats happen? Can you help me?

    Thanks