[Xapian-discuss] building php bindings

Olly Betts olly at survex.com
Fri Nov 17 21:04:32 GMT 2006


On Fri, Nov 17, 2006 at 01:22:16PM -0700, dennis wrote:
> Sam Liddicott wrote:
> >It means you have an unclean php installation or possibly the vesitages of 
> >one installation along with a good installation.
> >[...]
>
> Strangely, I only have one php installed - I downloaded and built 
> php-5.1.5. Here is the config command:

I think Sam has misdiagnosed the problem here.

> The only php.ini exists under /usr/local/lib/php.ini...
> 
> And the sample code:
> 
> <?php
> dl('xapian.so');
> echo xapian_version_string()."\n";
> ?>
> 
> tries to load xapian.so from /usr/local/lib. If I put xapian.so into 
> /usr/local/lib, I get this message:

OK, so it really is looking there.

> PHP Fatal error:  Class 'Xapian' not found in 
> /home/apache/...../htdocs/xtest.php

Sorry, my PHP5 example only works if you 'include "xapian.php";' first.

For PHP5, the simple test would be:

<?php
dl('xapian.so');
echo version_string()."\n";
?>

> I'm running CentOS 4.4 final.

But your PHP5 was built from source, not installed from a package?
It's very odd that you get /usr/local/lib in php.ini but not from
php-config --extension-dir.

Cheers,
    Olly



More information about the Xapian-discuss mailing list