break
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 4.50 out of 5)
Loading...

Downgrading eAccelerator – cPanel

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:

[email protected] [~] # cd downloads

Now, we download the source, extract it, then move into the newly created folder:

[email protected] [~/downloads] # wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2

[email protected] [~/downloads] # tar jxvf eaccelerator-0.9.5.3.tar.bz2

[email protected] [~/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:

[email protected] [~/downloads] # phpize

[email protected] [~/downloads] # ./configure

[email protected] [~/downloads] # make

I like to run the make test, to ensure that there are no issues:

[email protected] [~/downloads] # make test

Once that passes, you can run the command to install the module:

[email protected] [~/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:

[email protected] [~/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.

7 responses to “Downgrading eAccelerator – cPanel”

  1. Bill says:

    Thanks for this. Does this step actually work?

    tar zxvf eaccelerator-0.9.5.3.tar.bz2

    I get “gzip: stdin: not in gzip format”

  2. Bill says:

    Also, be careful when cutting and pasting the code for php.ini. The code on this page has smart quotes in it!

  3. Chris says:

    Thanks Bill, will update the formatting so that copy and paste works! I have also corrected the typo for extracting the bz2 file.

  4. sprawl says:

    You have tested it and writing form your personal experience or you find some information online?

  5. Chris says:

    I have tested this on many servers, and it does work.

Leave a Reply

Your email address will not be published. Required fields are marked *