Between izx's answer, 32bitfloat's comment and a bit of googling, I got this working (on Ubuntu 12.04 LTS). Here's exactly what I had to do. All these commands are as root, and some details may be different on your setup.
First, clear out any traces of existing ClamAV:
aptitude install zlib1g-dev php5-dev
aptitude purge clamav clamav-base clamav-data clamav-docs clamav-freshclam libclamav6
Download the latest ClamAV, make and install it:
tar xzf clamav-0.98.tar.gz
Make freshclam work and run it:
cp /usr/local/etc/freshclam.conf.sample /usr/local/etc/freshclam.conf
Test it works:
Download the latest PHP-ClamAV, make and install it:
tar xzf php-clamav_0.15.7.tar.gz
Install into Apache and restart:
echo "extension=clamav.so" > /etc/php5/conf.d/clamav.ini
service apache2 restart
I hope that lot's useful to somebody. I really wish
php-clamav was still supported on Aptitude. It would be far nicer than the above.