UPDATE: The latest eAccelerator version doens’t contain the PHP API anymore. It therefore does no longer work with Concrete5! The upcoming version 5.4 is going to have support for APC and memcache. Sorry!
You want more speed with Concrete5? Make sure you’re using eAccelerator!
In this tutorial I’ll explain how to install eAccelerator on a Debian Linux Server.
Create a page called info.php somehwere in a directory you can access using http://…
1 2 3
<?php phpinfo(); ?>
Try to find “eAccelerator”. If you can’t find it, it’s not installed, go ahead with the following instructions.
Open a console/ssh connection to your server and enter these commands:
wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2 tar xvfj eaccelerator-0.9.5.3.tar.bz2 cd eaccelerator-0.9.5.3 phpize ./configure --with-eaccelerator-shared-memory --with-php-config=/usr/bin/php-config --with-eaccelerator-userid=www-data --with-eaccelerator-content-caching make make install
You might want to check whether 0.9.5.3 is still the latest version. As of the 12th of June 2009 it is.
Make sure there are no error messages before you continue.
Create the directory where you want to save the eAccelerator cache files:
mkdir -p /var/cache/eaccelerator chmod 0777 /var/cache/eaccelerator
Create the config file for eAccelerator. Use a vi or any other text editor to create the config file:
Enter this content:
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_ttl = "0" eaccelerator.shm_max = "0" eaccelerator.shm_prune_period = "0" eaccelerator.shm_only = "0" eaccelerator.compress = "1" eaccelerator.compress_level = "9"
You can restart apache using this command now:
Open the info.php again and check whether you can see eAccelerator. If everything looks fine, go to the directory of your Concrete5 and edit “config/site.php” – add this line:
Open your Concrete5 and feel the difference!