[Xapian-discuss] Debian etch packages of php5-xapians have old
style flat function interface
Olly Betts
olly at survex.com
Wed May 23 08:14:06 BST 2007
On Wed, May 23, 2007 at 12:28:40AM +0100, Francis Irving wrote:
> 1) phpinfo says the Xapian module is loaded, version 0.9.9
I'm hoping to sort of debian packages of 1.0.0 next week.
> 2) The old style flat functions like new_database are there
That is expected.
In PHP4, the classes are implemented using calls to the zend API. But
that technique apparently can't be used for PHP5 for some reason nobody
has ever fully explained to me, so instead SWIG wraps the Xapian API as
flat functions using calls to the zend API from a C++ wrapper, and then
wraps those with class wrappers implemented in PHP.
> 3) The new style classes (XapianDatabase etc.) are not there
I suspect you've not loaded the PHP class wrappers. I think this note
in the documentation was added after 0.9.9:
If you're using PHP5, you also need to add `include "xapian.php"'
to your PHP scripts which use Xapian in order to get the PHP class
wrappers.
Cheers,
Olly
More information about the Xapian-discuss
mailing list