HOWTO Build your own binaries of PHP Xapian bindings for Debian
Due to a licensing issue, the PHP bindings for Xapian were removed from Debian Squeeze. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=513796 for more information about this.
Though, it is not really hard to build your own package from source.
Here is how:
sudo apt-get build-dep xapian-bindings sudo apt-get install php5-dev php5-cli apt-get source xapian-bindings cd xapian-bindings-1.2.* rm debian/control env PHP_VERSIONS=5 debian/rules maint debuild -e PHP_VERSIONS=5 -us -uc cd .. sudo dpkg -i php5-xapian_*.deb
Be careful: the extracted source directory (xapian-bindings-1.2.*) has to be absolutely clean, so if you tried a first time and it failed, remove the whole directory before trying again.
Of course, the same procedure holds true for Ubuntu as well.
2012-12-23 edit: if you’re using PHP 5.4, you need to modify the debuild line. Check the update article on Xapian’s wiki
To enable the extension, don’t forget to create a xapian.ini (or 20-xapian.ini for the latest Ubuntu with PHP 5.4) containing “extension = xapian.so” in /etc/php5/apache2/conf.d/, then restart your web server.