Browse > Home /

| Subcribe via RSS

Quick Tip - Installing Eaccelerator with Litespeed

April 12th, 2008 | 2 Comments | Posted in Tutorials, development

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

As mentioned in an earlier post, I am currently in the process of moving web hosts. As late as this morning I was perfectly happy with the configuration I had set up using the Nginx webserver and was ready to start the move, until I decided to make life easier for myself and try the Litespeed webserver (which WordPress.com uses) instead. Installation went swimmingly, despite a 3 hour power cut at a critical stage, up until the point I decided to install Eacceelerator as well and then things sort of stopped. For those of you who find yourself in the same situation - there is an extra step you need to perform to get Litespeed to see your Eaccelerator extension.

Once you have compiled Eaccelerator on your server (even if you use the Litespeed PHP compiler built into the administration website), you may find that you will need to copy the eaccelerator.so from the standard directory into the very strange looking Litespeed extensions directory before it can be enabled in your php.ini file.

To find out the directory you need, create a php file with the following content on your webserver:

and load it in your browser. You are looking for a line under PHP Core that looks like this:

You may need to create the directory, as on my installation it didn’t exist, but once you have the eaccelerator.so file in the right place you can add the following to your php.ini file:
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"

Finally, restart the Litespeed server, create the cache directory (shown in the above configuration details if it doesn’t already exist) and run your phpinfo() page again. If it has all worked you should see the following at the bottom of the first block of information:

More notes on this issue can be found here and here

Tags: , , , ,