[Xapian-devel] Usage with PHP

James Aylett james-xapian at tartarus.org
Sun Jul 24 20:04:46 BST 2005


On Sun, Jul 24, 2005 at 02:49:30PM -0400, Jacob Mahoney wrote:

> I am trying to replace my forum's search feature with the Xapian search
> system (the forum is phpBB), and there's some critical information that
> isn't in the Xapian documentation.  I need information on installing
> xapian into PHP, since this area is not very detailed in the online
> documentation.
> 
> So, how does one go about using the Xapian search system with PHP?
> 
> OS:FreeBSD 5.4-RELEASE
> PHP 5.0.3
> Extensions: /usr/local/lib/php/20041030
> Database: MySQL 4.1

If you've installed xapian-core, download xapian-bindings and build
the PHP ones. ``make install'' will then install all the bits you need
in the PHP extensions directory.

However I suspect you won't get this to work - the PHP bindings we
supply are for PHP4, and the system we use to generate the bindings
doesn't work with PHP5 at all to my knowledge. What you can probably
do instead is to use omega to generate XML files of results sets, and
parse that in PHP5 to display the results. You can keep your database
up to date using scriptindex, also in the omega package. (The only
thing fiddly here is if you need to delete documents from the Xapian
database, which scriptindex can't currently do. If this is essential
there are either workarounds, or we could probably add suitable
functionality.)

Cheers,
James

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org




More information about the Xapian-devel mailing list