[Xapian-discuss] php fatal error no matching for overloaded function Enquire_set_sort_by_key

Xiao-Wei (Shawn) Xu xwxu at astreetpress.com
Thu Apr 5 08:57:40 BST 2012


I have uninstalled the old version and reinstalled the latest xapian php
binding which is version 1.2.9 and also replaced xapian.php with the
latest. And restarted apache then verified that the new xapian extension is
loaded successfully.

Sample code :

+                       $key = new XapianMultiValueKeyMaker();
+                       $key->add_value(271, false);
+                       $key->add_value(473, false);
+                       $this->enquiryObject->set_sort_by_key($keymaker);

This gives me the same error

( ! ) Fatal error: No matching function for overloaded
'Enquire_set_sort_by_key' in ...

if I change the last line to:

+                       $this->enquiryObject->set_sort_by_key($keymaker,
false);

then I see segmentation fault from apache error log, no response is served.

PHP Version => 5.3.6-13ubuntu3.6
Server version: Apache/2.2.20 (Ubuntu)
Server built:   Feb 14 2012 17:53:51
DISTRIB_DESCRIPTION="Ubuntu 11.10"


Thanks.


On Tue, Apr 3, 2012 at 1:56 PM, Olly Betts <olly at survex.com> wrote:

> On Tue, Apr 03, 2012 at 01:42:41PM +0800, Xiao-Wei (Shawn) Xu wrote:
> > xapian.so extension:
> >
> > Xapian Compiled Version => 1.2.4
> > Xapian Linked Version => 1.2.7
>
> 1.2.8 fixed an issue with the generated wrapper, so trying a newer
> version might be worthwhile.
>
> Otherwise a script to reproduce the issue would be useful.
>
> > xapian.php seeing from the head of the file:
> >
> >  * This file was automatically generated by SWIG (http://www.swig.org).
> >  * Version 1.3.40
> >
> > Looks there's version inconsistency there?
>
> That's SWIG 1.3.40, so there's no inconsistency.
>
> Cheers,
>    Olly
>


More information about the Xapian-discuss mailing list