What is eAccelerator for PHP


Before we can understand how eAccelerator (http://eaccelerator.net/) will help speed up your websites loading speed, it is important to realise how php scripts are executed and run to power your websites.

Executing PHP Scripts

When you create a php script to do amazing things like pulling information out of a MySQL database or connecting to a web service to perform complex authentication or other wondrous things, the php script must be compiled into byte-code before it can be run by the web server. The result of this is that each time a user accesses that specific php script, usually through your website, that script is then compiled and then executed. When multiple people access the same script, it is being recompiled over and over which can slow down your website and essentially puts an extra bit of strain on the web server it is being run on.

What is eAccelerator for PHP

Now this is where eAccelerator comes into play. eAccelerator is a php extension that you install onto a web server. After it is installed, each php script will then automatically be precompiled the first time they are executed and also stored for later. Now each time the script is accessed, the pre-compiled script is executed without the need of having to compile the script first.

Interested in installing eAccelerator? I have created a quick tutorial on how to install eAccelerator on Debian here.