[Xapian-discuss] Re: PHP searches - not figuring it out

Matthew Barnicle matthew at wageslavery.org
Thu Feb 8 04:20:44 GMT 2007


> This works
>
> $op_or = XapianQuery::OP_OR;
> $query = new XapianQuery($op_or,$query1,$query2);
>
> Andrey

Hi Andrey.  Thanks for the example code, I will file it away..

I tried the above also, and it doesn't work.  Here is my code:

$op_or = XapianQuery::OP_OR;

And the error:

parse error, unexpected ';', expecting '('

Is this because I'm using PHP 4 and not 5?  I thought 4 supported this syntax..  I know
it does for method calls, but maybe not for static vars?  So otherwise what could be the
problem?  Compilation?  I followed the installation instructions on the site.  First
installed xapian-core-0.9.9, then xapian-bindings-0.9.9, then omega-0.9.9.  In each
case, I ran "./configure; make; make install".  Everything went fine, no warnings or
errors...

My compiler details:

[gatto at chi01-051-06 software]$ gcc -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix

[gatto at chi01-051-06 software]$ g++ -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.6/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking
--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions
--enable-java-awt=gtk --host=i386-redhat-linux
Thread model: posix
gcc version 3.4.6 20060404 (Red Hat 3.4.6-3)

- Matt




More information about the Xapian-discuss mailing list