Hello,

I am attempting to run the smoketest.php file from my devserver and
am getting nothing but errors. It looks like it did not install
correctly. Yesterday I compiled the source on os x and it appeared
to install just fine, but now it is not working at all. I tried to
replace the location of the xapian.php file with a hardcoded located
and got a different set of errors. Here are the errors with the
original smoketest.php

Warning: include(php5/xapian.php) [function.include]: failed to open
stream: No such file or directory in /Users/mttuser/Sites/IEOC/
smoketest.php on line 25

Warning: include() [function.include]: Failed opening 'php5/
xapian.php' for inclusion (include_path='.:/usr/local/php5/lib/php')
in /Users/mttuser/Sites/IEOC/smoketest.php on line 25

Fatal error: Class 'Xapian' not found in /Users/mttuser/Sites/IEOC/
smoketest5.php on line 23



Here are the errors that I get when I point to the location of
xapian.php:

Warning: dl() [function.dl]: Unable to load dynamic library '/usr/
local/php5/lib/php/extensions/no-debug-non-zts-20060613/xapian.so' -
(null) in /usr/local/php5/xapian.php on line 23

Fatal error: Class 'Xapian' not found in /Users/mttuser/Sites/IEOC/
smoketest5.php on line 23




If i move the xapian.so file into the no-debug-non-zts-20060613
directory i get yet more errors. The file is taken from /usr/lib/php/
extensions/no-debug-non-zts-20020429/xapian.so

Warning: dl() [function.dl]: |?B?: Unable to initialize module
Module compiled with module API 020429, debug=0, thread-safety=0
PHP compiled with module API 060613, debug=0, thread-safety=0 These
options need to match in /usr/local/php5/xapian.php on line 23

Fatal error: Class 'Xapian' not found in /Users/mttuser/Sites/IEOC/
smoketest5.php on line 23

If anyone has any idea of what is going on help would be greatly
appreciated.

-Frank


Frank Claycomb
Software Developer
MountainTop Technologies
814-536-7676

Search Discussions

  • Olly Betts at Nov 27, 2007 at 4:29 pm

    On Tue, Nov 27, 2007 at 09:25:00AM -0500, Frank Claycomb wrote:
    I am attempting to run the smoketest.php file from my devserver and
    am getting nothing but errors. It looks like it did not install
    correctly. Yesterday I compiled the source on os x and it appeared
    to install just fine, but now it is not working at all. I tried to
    replace the location of the xapian.php file with a hardcoded located
    and got a different set of errors. Here are the errors with the
    original smoketest.php
    How are you running smoketest.php? The expected way is by running
    "make check" in the source tree, but it sounds like you're trying
    to install smoketest.php.
    If i move the xapian.so file into the no-debug-non-zts-20060613
    directory i get yet more errors. The file is taken from /usr/lib/php/
    extensions/no-debug-non-zts-20020429/xapian.so

    Warning: dl() [function.dl]: |?B?: Unable to initialize module
    Module compiled with module API 020429, debug=0, thread-safety=0
    PHP compiled with module API 060613, debug=0, thread-safety=0 These
    options need to match in /usr/local/php5/xapian.php on line 23
    Based on the API version number "20020429", you've built your module for
    PHP4, which means it just isn't going to work with PHP5.

    Start from a clean xapian-bindings source tree and configure like so:

    ./configure PHP_CONFIG=php-config5

    If you don't have "php-config5", you may need to install a "PHP5
    development" package or similar to get it, or it might be "php-config"
    but with a different path. I'm not familiar with OS X so I don't know
    how this works there I'm afraid.

    Cheers,
    Olly
  • Frank Claycomb at Nov 27, 2007 at 7:44 pm
    Olly,

    Thanks for the speedy reply. I was in fact trying to run
    smoketest.php from the webbrowser. at any rate, I have now pointed
    at my php-config file and when compiling I get this error when
    running make in the bindings.

    Making all in examples
    make[5]: Nothing to be done for `all'.
    make[4]: Nothing to be done for `all-am'.
    Making all in .
    mkdir built
    mkdir: built: File exists
    make[3]: [built/xapian_jni.jar] Error 1 (ignored)
    /usr/bin/jar -cf built/xapian_jni.jar org/xapian/*.class org/xapian/
    errors/*.class

    I built the core as well pointing to the php-config file as well
    (just for good measure) and passed it to the bindings configure
    also. it was located in
    /usr/local/php5/bin/php-config.

    I did make sure that this is the location (used slocate that I had
    just installed today).

    Any idea why this is erroring?

    -Frank

    On Nov 27, 2007, at 11:29 AM, Olly Betts wrote:
    On Tue, Nov 27, 2007 at 09:25:00AM -0500, Frank Claycomb wrote:
    I am attempting to run the smoketest.php file from my devserver and
    am getting nothing but errors. It looks like it did not install
    correctly. Yesterday I compiled the source on os x and it appeared
    to install just fine, but now it is not working at all. I tried to
    replace the location of the xapian.php file with a hardcoded located
    and got a different set of errors. Here are the errors with the
    original smoketest.php
    How are you running smoketest.php? The expected way is by running
    "make check" in the source tree, but it sounds like you're trying
    to install smoketest.php.
    If i move the xapian.so file into the no-debug-non-zts-20060613
    directory i get yet more errors. The file is taken from /usr/lib/
    php/
    extensions/no-debug-non-zts-20020429/xapian.so

    Warning: dl() [function.dl]: |?B?: Unable to initialize module
    Module compiled with module API 020429, debug=0, thread-safety=0
    PHP compiled with module API 060613, debug=0, thread-safety=0 These
    options need to match in /usr/local/php5/xapian.php on line 23
    Based on the API version number "20020429", you've built your
    module for
    PHP4, which means it just isn't going to work with PHP5.

    Start from a clean xapian-bindings source tree and configure like so:

    ./configure PHP_CONFIG=php-config5

    If you don't have "php-config5", you may need to install a "PHP5
    development" package or similar to get it, or it might be "php-config"
    but with a different path. I'm not familiar with OS X so I don't know
    how this works there I'm afraid.

    Cheers,
    Olly



    Frank Claycomb
    Software Developer
    MountainTop Technologies
    814-536-7676
  • Olly Betts at Nov 27, 2007 at 8:31 pm

    On Tue, Nov 27, 2007 at 02:44:14PM -0500, Frank Claycomb wrote:
    Thanks for the speedy reply. I was in fact trying to run
    smoketest.php from the webbrowser.
    Ah, OK. It's not intended to work like that.
    at any rate, I have now pointed
    at my php-config file and when compiling I get this error when
    running make in the bindings.

    Making all in examples
    make[5]: Nothing to be done for `all'.
    make[4]: Nothing to be done for `all-am'.
    Making all in .
    mkdir built
    mkdir: built: File exists
    make[3]: [built/xapian_jni.jar] Error 1 (ignored)
    /usr/bin/jar -cf built/xapian_jni.jar org/xapian/*.class org/xapian/
    errors/*.class
    That's building the java bindings, and isn't really an error (as make
    says, it's "ignored"). It just means the "built" subdirectory already
    exists.

    If there's actually a problem here, you didn't show us the right part
    of make's output.

    Does "make check" work?

    Incidentally, if you're only interested in the PHP bindings, you can
    configure with "--with-php". If you don't specify any languages,
    configure will try to build for all languages it finds suitable tools
    for.

    Cheers,
    Olly
  • Frank Claycomb at Nov 27, 2007 at 8:36 pm
    Olly,

    This time I ran it just for php and it worked just fine. Ran the
    make-check and it worked. Now I just need to find some documentation
    for using this with php on a webserver. Do you have any
    recommendations?

    -Frank
    On Nov 27, 2007, at 3:31 PM, Olly Betts wrote:
    On Tue, Nov 27, 2007 at 02:44:14PM -0500, Frank Claycomb wrote:
    Thanks for the speedy reply. I was in fact trying to run
    smoketest.php from the webbrowser.
    Ah, OK. It's not intended to work like that.
    at any rate, I have now pointed
    at my php-config file and when compiling I get this error when
    running make in the bindings.

    Making all in examples
    make[5]: Nothing to be done for `all'.
    make[4]: Nothing to be done for `all-am'.
    Making all in .
    mkdir built
    mkdir: built: File exists
    make[3]: [built/xapian_jni.jar] Error 1 (ignored)
    /usr/bin/jar -cf built/xapian_jni.jar org/xapian/*.class org/xapian/
    errors/*.class
    That's building the java bindings, and isn't really an error (as make
    says, it's "ignored"). It just means the "built" subdirectory already
    exists.

    If there's actually a problem here, you didn't show us the right part
    of make's output.

    Does "make check" work?

    Incidentally, if you're only interested in the PHP bindings, you can
    configure with "--with-php". If you don't specify any languages,
    configure will try to build for all languages it finds suitable tools
    for.

    Cheers,
    Olly



    Frank Claycomb
    Software Developer
    MountainTop Technologies
    814-536-7676
  • Olly Betts at Nov 27, 2007 at 11:25 pm

    On Tue, Nov 27, 2007 at 03:36:32PM -0500, Frank Claycomb wrote:
    This time I ran it just for php and it worked just fine. Ran the
    make-check and it worked. Now I just need to find some documentation
    for using this with php on a webserver. Do you have any
    recommendations?
    http://www.xapian.org/docs/bindings/php/

    Cheers,
    Olly
  • Frank Claycomb at Nov 28, 2007 at 1:30 pm
    Well what I want to do is search basically an entire mysql database
    (making a quick search). People in #php on freenode suggested xapian
    to me. Is xapian really what I want to use for this? I used to
    think it was but now I am not so sure. I am finding conflicting
    definitions of what xapian is and does. Also I read that php
    documentation that you pointed me to, it does not really tell me
    anything pertinent to programming, just how to get it to work. I am
    having some problems finding the documentation that explains now to
    code for xapian (such as the api in the php bindings).

    thanks for all of your help so far,

    -Frank


    Frank Claycomb
    Software Developer
    MountainTop Technologies
    814-536-7676
  • Jim at Nov 28, 2007 at 3:42 pm

    Frank Claycomb wrote:
    Well what I want to do is search basically an entire mysql database
    (making a quick search). People in #php on freenode suggested xapian
    to me. Is xapian really what I want to use for this? I used to think
    it was but now I am not so sure. I am finding conflicting definitions
    of what xapian is and does. Also I read that php documentation that
    you pointed me to, it does not really tell me anything pertinent to
    programming, just how to get it to work. I am having some problems
    finding the documentation that explains now to code for xapian (such
    as the api in the php bindings).

    thanks for all of your help so far,

    -Frank
    I currently support one client that has given up on his CMS search as
    being way too slow and asked me for a solution. My solution was to
    extract the textual data from the database on a regular basis (daily in
    his case) and write it to a file and index that file. The organization
    of the data was such that the was a node number associated with each
    record and the CMS worked by node number. So I was able to index all
    the records, using the node number as a reference and when I did the
    search I was able to point the user to the data via a url including the
    node number. For instance, http://somehost.com?node�82

    But we need to know a bit more about your situation. Once you've
    indexed the data from the database someone is going to run a search
    query on it and generate some hits. What exactly do you want to do at
    that point? Is this web based, or a local application? The data that
    is returned should probably include a reference to something that would
    allow you to retrieve the record that contained the data too.

    Xapian cannot really be used to do real time queries on mysql databases
    or any other live database for that matter). If that is an absolute
    requirement, then you should use the search mechanisms in the database.
    But if you can live with data that isn't 100% up to the minute, xapian
    will be significantly faster.

    Jim.
  • Jim at Nov 28, 2007 at 7:05 pm
    When you get the omega source downloaded take a look at the dbi2omega
    file in the xapian-omega-1.0.x directory. It's a perl script to
    generate an input file for scriptindex. It might not do exactly what
    you want, but it might give you a hint as to what you might need to do.
    Perhaps you could start with that and exand it as necessary.

    You would then have to come up with an index file as described in
    docs/scriptindex.txt.

    Jim.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupxapian-discuss @
categoriesxapian
postedNov 27, '07 at 2:25p
activeNov 28, '07 at 7:05p
posts9
users3
websitexapian.org
irc#xapian

3 users in discussion

Frank Claycomb: 4 posts Olly Betts: 3 posts Jim: 2 posts

People

Translate

site design / logo © 2021 Grokbase