[Xapian-discuss] Running two versions of Xapian on one server

James Aylett james-xapian at tartarus.org
Fri Dec 15 12:09:53 GMT 2006


On Fri, Dec 15, 2006 at 08:15:25AM +0000, Francis Irving wrote:

> This is really a general Unix/Linux question. I install Xapian
> manually from source on this particular server, and am using both the
> Perl and PHP bindings. 
> 
> I would like to run a (much!) newer version on the same server at the
> same time as the old one. This is so the website and existing indexer
> can continue to run, while I build the new index and check things
> work with the new version.
> 
> How can I build/install a new version of Xapian, so I explicitly
> tell Perl and/or PHP to use it? I'm wondering if something like
> I just build it, and set LD_LIBRARY path to the appropriate place
> of the build tree when calling Perl? But that doesn't help with
> testing with mod_php on the web server.

There are two things you need to do:

 1) install parallel Xapians

You can either do this into a different directory, or (in theory) in
the same directory providing the so version number has changed (which
it almost certainly will have done in your case). Separate directory
is easier to control.

 2) install parallel *bindings* to Xapian

This is harder. You could hack it to call the new bindings something
else, but I don't know how to do this for Perl, and doing it for PHP
is probably quite fiddly. (I can figure out how I'd attempt it, but
... eww.) An easier (but less pleasant) approach is to build parallel
*languages*, each with a binding to the right version of Xapian. This
is reasonably straightforward for Perl, but for PHP you're going to
have to either use the fastcgi SAPI, or run a second apache which
loads a second PHP. Bit nasty, but it will work.

The main reason it's difficult to do with the same language and
different versions of the bindings is that it's not just the Xapian
library that has changed in the intervening versions - the bindings so
will have changed also :-/

J

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



More information about the Xapian-discuss mailing list