hello I m a newbie here . i have used xapian with c++. now i wanna use php. i installed the bindings and went thru the docs. the examples given are command line ones. i wanna create an application where search string is taken thru a form, from a user. i wud like a example of a pgm which runs in the browser( not on the command line). Is there such a example pgm available? n another doubt i have is whether all the classes that were available fr C++ are of no use to php? or only a few classes had to be modified fr bindings pakage? rest of them are available fr use by php? if not then where is the description fr classes used in bindings? my doubts might be downrite silly, coz i m not a pro s/w engg, just a sudent. So excuse me. thanks. doubtfire40008@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.tartarus.org/pipermail/xapian-discuss/attachments/20060307/bf959e9b/attachment.htm
On Tue, Mar 07, 2006 at 06:19:53PM +0530, durga bidaye wrote:> I m a newbie here . i have used xapian with c++. now i wanna use php. i > installed the bindings and went thru the docs. the examples given are > command line ones. i wanna create an application where search string is > taken thru a form, from a user. i wud like a example of a pgm which runs > in the browser( not on the command line).We don't currently have such an example, but reading input from a form in PHP isn't at all Xapian specific and you can find thousands of examples of how to do it on the web, e.g.: http://www.google.com/search?q=php+form+input> n another doubt i have is whether all the classes that were > available fr C++ are of no use to php? or only a few classes had to be > modified fr bindings pakage? rest of them are available fr use by php? if > not then where is the description fr classes used in bindings?Did you read the PHP bindings documentation? See php/docs/bindings.html in xapian-bindings. Pretty much all classes and methods are wrapped in PHP. SWIG doesn't currently allow you to make a PHP subclass of a wrapped C++ class and pass it into C++, without which a couple of classes (e.g. MatchDecider) are pointless so not wrapped. And we don't currently wrap the Xapian::Error classes (because PHP4 doesn't support exceptions). And sometimes a new class/method doesn't get wrapped right away, though I try to keep everything in step. Generally Java and Perl lag more because it requires more work to add a wrapper for those. If you find a class or method which isn't wrapped and there's not documented reason, report it and we'll fix the situation. Cheers, Olly
Hello I have installed php bindings and 'xapian.so' is present in folder /usr/lib/php4/20050606/( the one wich apache looks fr in order to load dynamic libraries) but inspite of that, when i try to execute the pgm " simplesearch.php" i get the following errors: PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/20050606/xapian.so' - /usr/lib/php/20050606/xapian.so: cannot open shared object file: No such file or directory in Unknown on line 0 Fatal error: Call to undefined function: new_database() in /home/jana/final_search1/simplesearch.php on line 30 In php.ini i have set the correct path fr dynamic libraries.bt still i m gettin the error.also am i gettin the error "undefined function new_database" just becoz the dynamic library is not gettin loaded...plz help. doubtfire40008@gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.tartarus.org/pipermail/xapian-discuss/attachments/20060315/4cab2373/attachment.htm
On Sat, 2006-03-18 at 21:35 +0530, durga bidaye wrote:> hey > > this is my reply( in bold). anyway tell me where have i gone wrng, i f > u can.There's no bold im Email ;-)> XAPIAN_CONFIG expects the path to the xapian-config script, > _not_ > a directory path! > > i passed the correct path the next time around, but still xapian.so > not found in /usr/lib/php4/ >What's the output of your configuration run? More important still: what's the output of running 'make install'? (And did you export some exotic 'PREFIX' or set '--prefix' on the configure command line?). cheers RalfD P.S: is your keyboard broken? There seem to be characters missing from your email.> > > Still i went ahead, n did make as well as make install. > > > > but again found that xapian.so was not present > > in /usr/lib/php4/20050606/ > > > > Now why isnt xapian-bindings gettin installed? > > Maybe it's in /usr/local/lib/php.... ? > > its not in /usr/local/lib/php either > > > HTH Ralf Mattes > ----------------------------------------------------------------------------------------------------------- > Thanks. > doubtfire40008@gmail.com > > > > doubtfire40008@gmail.com > > > > > ------------------------------------------------------------------------------ > > On 3/17/06, Olly Betts <olly@survex.com> wrote: > > On Thu, Mar 16, 2006 at 07:06:43PM +0530, durga > bidaye wrote: > > > PHP Warning: Unknown(): Unable to load dynamic > library > > > '/usr/lib/php4/20050606/xapian.so' > > - /usr/lib/php4/20050606/xapian.so: > > > undefined symbol: tclStubsPtr in Unknown on line > 0 > > > > > > wat is this tclStubsPtr thing? > > > > I don't know, but it sounds like something to do > with tcl > > rather than > > PHP! Just to check, you didn't copy xapian.so by > hand and > > accidentally > > take it from the tcl subdirectory instead of the php > one? > > > > > > What does this report: > > > > > > > > php-config --extension-dir > > > > > > this command doesnt work on my sys..does not mean > my version > > of php is too > > > old fr php bindings?? > > > > Erm, if that doesn't work I don't really understand > how you've > > managed > > to build and install the PHP bindings - configure > uses this to > > find > > where PHP is installed... > > > > When you say "this command doesnt work", how does it > fail? > > > > Did you do anything unusual to build the bindings > (anything > > other than > > ./configure / make / make install)? > > > > Cheers, > > Olly > > > > _______________________________________________ > > Xapian-discuss mailing list > > Xapian-discuss@lists.xapian.org > > http://lists.xapian.org/mailman/listinfo/xapian-discuss > >