Hi I found a lot of posts about PHP, SWING and Xapian. I have never worked with SWING, and I am not a guru of PHP. I would like to get any example how I can work with Xapian using PHP. I will appreciate any responses. thanks ----------- http://www.bannershift.com
On Wed, May 04, 2005 at 08:30:02AM -0400, info@bannershift.com wrote:> I found a lot of posts about PHP, SWING and Xapian. > > I have never worked with SWING, and I am not a guru of PHP.It's "SWIG" not "SWING", but you don't need to worry about it anyway. SWIG is run by me when I make the source tarball, so you don't even need to have it installed. Just install xapian-core and PHP4 (you probably need the "php4-dev" or similarly named package if using a package manager), then download and unpack xapian-bindings, and configure and build as with most other packages. Currently xapian-bindings defaults to building bindings for all the languages you have suitable tools for, but you can control this by passing options to configure -- see "./configure --help".> I would like to get any example how I can work with Xapian using PHP.There are some examples and documentation in xapian-bindings. Look at php4/docs/bindings.html and in php4/docs/examples/. Cheers, Olly
On Wed, May 04, 2005 at 09:51:20AM -0400, info@bannershift.com wrote:> Warning: Function registration failed - duplicate name - > new_positioniterator in > /home/sly/codebase/xapian/xapian-bindings-0.8.5.1/php4/smoketest.php on > line 22Ah yes, you need to download this: http://www.oligarchy.co.uk/xapian/0.8.5/xapian_wrap.cc.gz Uncompress it ("gunzip" or "gzip -d") and replace php4/xapian_wrap.cc with the uncompressed file. Hmm, I thought this was linked to from the download page, but it appears it isn't. Cheers, Olly
Please keep discussion on the mailing list - this is likely to be of interest to others too. On Wed, May 04, 2005 at 10:35:11AM -0400, info@bannershift.com wrote:> I am getting the same errors. > > I have just checked. I am using xapian core version 0.8.5, > while xapian bindings is 0.8.5.1 > > It could be a problem ?No, there were a couple of problems with xapian-bindings in 0.8.5, so I put together 0.8.5.1 to fix these (it seemed better than forcing a new release of xapian-core which only bumped the version). This thread suggests that 0.8.5.1 plus the replacement xapian_wrap.cc should work: http://thread.gmane.org/gmane.comp.search.xapian.general/1532 I wonder what's different for you. Have you (or someone else) previously installed the xapian php bindings on this box? James noted that trying to load 2 different versions caused problems. If the box has a locate database, "locate xapian.so" should spot this. Otherwise I'm not sure what's wrong. Cheers, Olly