Hi Romita, The 3rd parameter should be '/solr/<corename>' because ping() sends request to /solr/<corename>/admin/ping handler. Try, it should work.
Regards. On 17 December 2012 03:23, Romita Saha <romita.s...@sg.panasonic.com> wrote: > Hi, > > I open the Solr browser using the following url: > > http://localhost:8983/solr/browser > > The PHP client code to ping server is <?php > require_once('Apache/Solr/Service.php'); > > // > // > // Try to connect to the named server, port, and url > // > $solr = new Apache_Solr_Service( 'localhost', '8983', '/solr' ); > > if ( ! $solr->ping() ) { > echo 'Solr service not responding.'; > exit; > } > > Could you please let me know if the above portion of the code is correct? > Or do I need to specify anything else in " $solr = new > Apache_Solr_Service( 'localhost', '8983', '/solr' );" > > > Thanks and regards, > Romita > > > From: "Romita Saha" <romita.s...@sg.panasonic.com> > To: solr-user@lucene.apache.org, > Date: 12/17/2012 10:02 AM > Subject: Re: Solr PHP client > > > > Hi, > > Yes I can access Solr via a browser. But cannot access it with Solr-PHP > client. > > Thanks and regards, > Romita > > > > From: Upayavira <u...@odoko.co.uk> > To: solr-user@lucene.apache.org, > Date: 12/14/2012 09:49 PM > Subject: Re: Solr PHP client > > > > Can you access your Solr server via a browser? I bet it is something > simple like a URL being wrong. > > Upayavira > > On Fri, Dec 14, 2012, at 09:37 AM, Romita Saha wrote: > > Hi I am using Solr-PHP client. I am not able to ping Solr. Is their any > > change that I need to make in Solr config files so that it can listen to > > > > the PHP client? > > > > I get the following error : > > > > ping() ) { echo 'Solr service not responding.'; exit; } > > > > Could someone please help. > > > > Thanks and regards, > > Romita > > >