I’ve lost count how many times I’ve needed to recompile a new version of APC for PHP on my server, so this mainly serves as a reminder on how to do it for next time.

  1. Go to http://pecl.php.net/package/APC and find the latest download link at the time.
  2. Login via SSH and go into root login via
    su -
  3. Navigate to the source folder:
    cd /usr/local/src
  4. wget the latest download from the PHP pecl link above. (i.e. wget http://pecl.php.net/get/APC-3.0.15.tgz)
  5. Unzip the archive like so:
    gunzip -c APC-3.0.15.tgz | tar xf -
  6. Navigate to the APC folder:
    cd APC-3.0.15
  7. phpize the APC folder to make the correct configuration file: /usr/bin/phpize
  8. Make the configuration file:
    ./configure --enable-apc --enable-apc-mmap --with-apxs --with-php-config=/usr/bin/php-config
  9. Start the compile:
    make
  10. Finish and install:
    make install
  11. Edit the php.ini file to enable the APC module based on the location provided from the previous command:
    pico -w /usr/lib/php.ini
  12. Finally restart apache to see the changes:
    service httpd restart

The important bits you need to put inside php.ini are the extension call like so:

extension = "apc.so"

You then also need to enable and configure APC to your liking. Here’s my setup:

apc.enabled = 1
apc.shm_size = 64
apc.ttl = 3600
apc.user_ttl = 3600
apc.optimization = 0
apc.filters = "-Gallery.*\.class, wp-cache-config, -mint.php"
apc.include_once_override=1
apc.write_lock=1

Other things you need to take into account is your PHP extension_dir setting. This needs to be set right to be able to load the module correctly above.
You should also bear in mind that /usr/bin/phpize and /usr/bin/php-config could be different for your system setup.


Looks like UKReg were intruded a little while back. I got this email earlier asking me to change my passwords just in case.
Anyone else with them should also do the same by visiting their website.

We are writing to inform you that we have recently discovered evidence of a network intrusion involving a Fasthosts server. We have reason to believe that the intruder has gained access to our internal systems, and that this may have in turn given them access to your username and some service passwords.

We have since closed the vulnerability through which access was gained, and have taken steps to ensure that this cannot happen again.

We therefore recommend, as a precaution, that you now change the control panel login password on your account.


I installed the latest version of Apache last night and enabled a new module that wasn’t previously available under Apache 1.3; mod_deflate. This gives the following speed and size improvements over generally every page hosted here.

Size Improvements

By adding the following code to httpd.conf once mod_deflate is compiled into apache you too can achieve similar results.

SetOutputFilter DEFLATE
DeflateFilterNote ratio
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary

I had a bit of a problem earlier on with my server. Exim, the bit that handles email, decided to eat up resources, which caused the Virtuozzo operating system to kick into action and start killing off processes that were eating up too much RAM. This left my server with just Apache and MySQL running.

Read the rest of this entry »

lotsa emails this way!