PHP bindings (was Re: [Xapian-discuss] Q prefix / Unique ID not being found)

Olly Betts olly at survex.com
Mon Mar 21 07:12:21 GMT 2005


On Mon, Mar 21, 2005 at 12:17:32AM +0000, James Aylett wrote:
> I'm on 1.3.23 at the moment. There seems to be something up with the
> bindings - merely loading them into PHP causes lots of "eek, function
> redefined" kind of errors.

Yes, that's the symptom.

In maintainer mode, the configure script for xapian-bindings should
check your swig version is suitable and disable PHP if it isn't.  You
can also specify 2 different swig versions.  Except I haven't checked
that change in yet (cough).

Try "cvs update", "make configure" in xapian-bindings, then configure
the bindings with:

./configure --enable-maintainer-mode SWIG_1_3_22=/path/to/swig-1.3.22

On ixion, I have SWIG 1.3.22 installed as /u1/olly/install/bin/swig-1.3.22

> There is one "Overloaded constructor ignored" (for Document), and we
> have an unprotected operator() lying around that PHP doesn't know what
> to do with.

We should probably run swig with -Werror now that we're running it when
we build the release tarball rather than on the end user's machine.

> I'm using PHP 4.2.1 built myself; I don't build any of the bindings
> against Debian.

The issue is they enabled some threading stuff in zend, which changes
the zend API slightly.  You're meant to use magic macros which expand to
nothing in the non-threaded case, but SWIG generates PHP without the
required macro in one place.

Doesn't sound like this is your problem though.

Cheers,
    Olly



More information about the Xapian-discuss mailing list