Frank Claycomb
2007-Nov-27 14:25 UTC
[Xapian-discuss] Problems with xapian php bindings in osx
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=20020429, debug=0, thread-safety=0 PHP compiled with module API=20060613, 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
Olly Betts
2007-Nov-27 16:29 UTC
[Xapian-discuss] Problems with xapian php bindings in osx
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.phpHow 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=20020429, debug=0, thread-safety=0 > PHP compiled with module API=20060613, debug=0, thread-safety=0 These > options need to match in /usr/local/php5/xapian.php on line 23Based 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
2007-Nov-28 13:31 UTC
[Xapian-discuss] Problems with xapian php bindings in osx
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
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.
Apparently Analagous Threads
- PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
- Java Bindings on a Mac
- PHP bindings fail on Ubuntu for xapian-bindings-1.2.21
- Exception in thread "main" java.lang.UnsatisfiedLinkError: no xapian_jni in java.library.path
- Python bindings smoketest error