The latest cPanel release comes with the option to have php version 5.3.1, and also uses the latest release candidate for eAccelerator, 0.9.6-rc1. These options are available to you through the EasyApache interface. There seems however, to be some bugs which cause unexpected high loads on busy servers, which some believe, are caused by a fault in the eAccelerator release candidate. Here are the steps you need to take in order to downgrade to eAccelerator Release-0.9.5.3.First things first though. If you have compiled Apache with the latest release of PHP, 5.3.1, you should stop now. The version of eAccelerator that we are downgrading to, does not support PHP 5.3. If you wish to downgrade your PHP version to 5.2.x, then you can follow this guide. One more note, please run EasyApache and uncheck the option to have eAccelerator installed.
Now, once you are prepared (running PHP version 5.x, do not have eAccelerator installed already), you will now need to log into your server via shell, and make sure you are the root user.
I always download everything to my downloads folder, so, we change to it:
root@server [~] # cd downloads
Now, we download the source, extract it, then move into the newly created folder:
root@server [~/downloads] # wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
root@server [~/downloads] # tar jxvf eaccelerator-0.9.5.3.tar.bz2
root@server [~/downloads] # cd eaccelerator-0.9.5.3
OK, lets get this thing installed. Most of these steps are taken directly from the creators site. Run the following:
root@server [~/downloads] # phpize
root@server [~/downloads] # ./configure
root@server [~/downloads] # make
I like to run the make test, to ensure that there are no issues:
root@server [~/downloads] # make test
Once that passes, you can run the command to install the module:
root@server [~/downloads] # make install
Now, the tricky part. You need to add the following to your php.ini file. I use VIM to edit, these are the commands I used:
root@server [~/downloads] # vim /usr/local/lib/php.ini
Go to the very bottom of that file. Paste in the following (copy the text below, then go to your ssh session, hit INS, then left click on the screen, it will paste it all in for you!).
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"
Now, to save your file, hit ESC, then type :wq and hit enter. Restart your Apache, and you should have a working version of eAccelerator installed.