Compile ffmpeg-php for PHP 5.3 (Yes – it DOES work!)

Search Google for a version of ffmpeg-php that works with PHP 5.3 and you will find nothing useful. In fact there are many sites where people claim that it does not work with PHP 5.3. Well, they’re wrong! It’s not the easiest thing to get to work but it DOES work with PHP 5.3. (Scroll down for download link to my version of

I am using Zend Server version of PHP 5.3 on Ubuntu 9.10 RC, this is what I did:

1. Install PHP sources (not 100% sure if this is actually required): sudo apt-get install php-5.3-source-zend-server.
2. Install build tools: sudo apt-get install build-essential
3. Install autoconf: sudo apt-get install autoconf
4. Install ffmpeg: sudo apt-get install ffmpeg
5. Install dev/header packages required to build: sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libgd2-xpm-dev
6. Download latest ffmpeg-php source:

7. tar xjf ffmpeg-php-0.6.0.tbz2
8. cd ffmpeg-php-0.6.0
9. (Zend Server – Optional) PATH=$PATH:/usr/local/zend/bin
10. phpize (produces LOADS of warnings, ignore, this is fine)
11. ./configure –enable-skip-gd-check
12. make
13. Copy ./modules/ into PHP extensions directory or location of your choice
14. Add to php.ini or custom ini file:
15. Restart the web server.

ffmpeg-php is now installed!

Download compiled file here: ffmpeg-php-0.6.0-php5.3.tar.gz

This is from my phpinfo:

PHP 5.3 with ffmpeg-php


Easy PHP 5.3 installation (Ubuntu)

I’ve been searching around for deb packages for PHP 5.3 for Ubuntu for a while, but not found a solution close to the ease of the original (Debian style) packages with a separate deb package for each extension. I’ve used Dotdeb packages in the past, however there are often small issues with these due to missing libraries (usually due to them being compiled on Debian which has older versions of some libraries than Ubuntu) and there are also some posts on their site in the PHP 5.3 section indicating that there are issues installing these packages on Ubuntu.

The EASY solution: Zend Server Community Edition


1. Download the ‘Universal Repository Script’ (ZendServer-4.0.5-RepositoryInstaller-linux.tar.gz) from the Zend website.
2. tar xjf ZendServer-4.0.5-RepositoryInstaller-linux.tar.gz
3. cd ZendServer-RepositoryInstaller-linux
4. sudo ./ 5.3 ce

This will add the Zend repositories to apt and start the installation.

Fix dependency with Ubuntu 9.10 RC (and possibly earlier versions) as Ubuntu 9.10 uses a later version of libkrb53 than Zend packages:

1. Download the Lenny version from Debian for your architecture:

2. Install via dpkg -i

Rerun the Zend installer above after doing this.

Install extra PHP extensions:

sudo apt-get install php-5.3-extra-extensions-zend-server

Access Zend Server to manage PHP:

HTTP: http://localhost:10081/ZendServer
HTTPS: https://localhost:10082/ZendServer

You will probably notice that tonnes of extensions are installed by default, to enable/disable them go to:
Server Setup -> Extensions
Click restart PHP in the bottom right to restart the web server.

To change PHP ini settings go to:
Server Setup -> Directives
Click restart PHP in the bottom right to restart the web server.

As Zend are using Apt PHP packages will be kept up to date as long as you update your system regularly (something which is distinctly lacking in Ubuntu/Debian).

Zend Server also includes script caching by default which should give speed improvements to executing PHP code.

More info on installation can be found here (note this has instructions for PHP 5.2):


jQuery chat plugin

The aim of the plugin is to provide a Facebook-like chatroom that can easily be added to any website. The plugin is written in Javascript and makes heavy use of the jQuery library to simplify implementation and integration.

The proposed features are:

  • Changable online status
  • Auto-away
  • Chatrooms
  • Private messaging
  • Friends list
  • Anything else that looks cool!

I have finished work on version 0.1 which is the first working version, here are a few screenshots:

The Status Menu
The status menu
The Friends List
The friends list
An example chat room
An example chat room

I have not added private messaging yet, but this will be added in a future version.

Targets for version 0.2:

  • Add private messaging
  • Improve PHP callback API
  • Improve speed of message display
  • Look at using persistent AJAX requests (Comet)

Vote for John & Edward to win X Factor!

John and Edward

Let’s face it, X Factor is a stupid show full of vaguely talented idiots who are desperate for 5 minutes of fame and then quickly disappear into obscurity when they get booted off the show (or even win the show in many cases). The first few shows that manage to bring out all the weird and delusional British public out from hiding are quite funny, but it goes quickly downhill from here. While ITV remain desperate for ratings, viewers and advertisers I don’t see this show going anywhere any time soon, so help make a mockery of this joke of a TV show by voting for the WORST act on there – John & Edward!

Number to call: 0901 61 611 10


Microsoft finally release a virus scanner

Microsoft Security Essentials has now been officially released (conveniently just before Windows 7 release, perhaps?).

I switched it out with Kaspersky about a week ago and so far so good. Kaspersky for Windows 7 is buggy and causes many slow down issues, it may be a beta but at this close to the October release date it’s a pretty poor offering. MSSE works like a charm, no slow down issues, virus tests on YouTube show excellent results, plus the best thing is it’s completely 100% free.

Find it here:


WordPress Plugin – Final tweaks

The plugin is now pretty much finished, there are certainly other options that could be added such as page summaries via AJAX, custom image sizes for specific preview etc but for now the only thing that is really left to do is to add a quicktag option so that the plugin can be easily used from the post editor.

This is very simple to do, first I have created a hook to add a script file:

[code lang=”php”]add_action(‘admin_print_scripts’, array(&$this, ‘Admin_Script’));[/code]

This script is only loaded within the admin (hence the action is ‘admin_print_scripts’) and it tells WordPress which function to get the script definition.

The Admin_Script function attaches a simple Javascript file to add the quicktag:

[code lang=”php”]/**
* Load admin javascipt file
* @return void
function Admin_Script() {
plugin_dir_url(__FILE__) . ‘wp-thumbshot-preview.js’,

It’s fairly obvious what this does, worth noting that quicktags is a prerequisite (so that the quicktags Javascript functions are loaded first).

The Javascript file ‘wp-thumbshot-preview.js’ contains the quicktag definition:

[code lang=”javascript”]edButtons[edButtons.length] =
new edButton(‘preview’,

Now in the code editor there is a ‘preview’ button so that the plugin’s preview tags can be auto completed!