PHP app not communicating with Solr

2011-01-12 Thread Eric
Web page returns the following message:
Fatal error: Uncaught exception 'Exception' with message '0 Status: 
Communication Error'

This happens in a dev environment, everything on one machine: Windows 7, WAMP, 
CakePHP, Tomcat, Solr, and SolrPHPClient. Error message also references line 
334 of the Service.php file, which is part of the SolrPHPClient.

Everything works perfectly on a different machine so this problem is probably 
related to configuration. On the problem machine, I can reach solr at 
http://localhost:8080/solr/admin and it looks correct (AFAIK). I am documenting 
the setup procedures this time around but don't know what's different between 
the two machines.

Google search on the error message shows the message is not uncommon so the 
answer might be helpful to others as well.

Thanks,
Eric


  


Re: PHP app not communicating with Solr

2011-01-12 Thread Lukas Kahwe Smith

On 12.01.2011, at 23:50, Eric wrote:

 Web page returns the following message:
 Fatal error: Uncaught exception 'Exception' with message '0 Status: 
 Communication Error'
 
 This happens in a dev environment, everything on one machine: Windows 7, 
 WAMP, CakePHP, Tomcat, Solr, and SolrPHPClient. Error message also references 
 line 334 of the Service.php file, which is part of the SolrPHPClient.
 
 Everything works perfectly on a different machine so this problem is probably 
 related to configuration. On the problem machine, I can reach solr at 
 http://localhost:8080/solr/admin and it looks correct (AFAIK). I am 
 documenting the setup procedures this time around but don't know what's 
 different between the two machines.
 
 Google search on the error message shows the message is not uncommon so the 
 answer might be helpful to others as well.


I ran into this issue compiling PHP with--curl-wrappers.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org





Re: PHP app not communicating with Solr

2011-01-12 Thread Dennis Gearon
I was unable to get it to compile. From the author, got one reply about the 
benefits of the compiled  version. After submitting my errors to him, have not 
yet received a reply.

##Weird thing 'on the way to the forum' today.##

I remember reading an article a couple of days ago which said the compiled 
version is 10-15% faster than the 'pure PHP' Solr library out there, (and it 
has 
a lot more capability,that's for sure!)

Turns out, this slower pure PHP version uses 'file_get_contents()'(FCG) to do 
the actual query of the Solr Instance. 


http://stackoverflow.com/questions/23/file-get-contents-vs-curl-what-has-better-performance

The article above shows that FCG is on average 22% slower than using cURL in 
basic usage. so modifying the 'pure PHP' library with cURL would make up for 
all 
of the speed that the compiled SolrPHP has.

 Dennis Gearon





- Original Message 
From: Lukas Kahwe Smith m...@pooteeweet.org
To: solr-user@lucene.apache.org
Sent: Wed, January 12, 2011 2:52:46 PM
Subject: Re: PHP app not communicating with Solr


On 12.01.2011, at 23:50, Eric wrote:

 Web page returns the following message:
 Fatal error: Uncaught exception 'Exception' with message '0 Status: 
Communication Error'
 
 This happens in a dev environment, everything on one machine: Windows 7, 
 WAMP, 
CakePHP, Tomcat, Solr, and SolrPHPClient. Error message also references line 
334 
of the Service.php file, which is part of the SolrPHPClient.
 
 Everything works perfectly on a different machine so this problem is probably 
related to configuration. On the problem machine, I can reach solr at 
http://localhost:8080/solr/admin and it looks correct (AFAIK). I am 
documenting 
the setup procedures this time around but don't know what's different between 
the two machines.
 
 Google search on the error message shows the message is not uncommon so the 
answer might be helpful to others as well.


I ran into this issue compiling PHP with--curl-wrappers.

regards,
Lukas Kahwe Smith
m...@pooteeweet.org


Re: PHP app not communicating with Solr

2011-01-12 Thread Eric
Resolved! In a rare flash of clarity, I removed the @ preceeding the 
file_get_contents call. Doing so made it apparent that my app was passing an 
incorrect Solr service port number to the SolrPHPClient code. Correcting the 
port number fixed the issue.

The lesson is... suppressed errors are hard to find.

--- On Wed, 1/12/11, Dennis Gearon gear...@sbcglobal.net wrote:

 From: Dennis Gearon gear...@sbcglobal.net
 Subject: Re: PHP app not communicating with Solr
 To: solr-user@lucene.apache.org
 Date: Wednesday, January 12, 2011, 3:37 PM
 I was unable to get it to compile.
 From the author, got one reply about the 
 benefits of the compiled  version. After submitting my
 errors to him, have not 
 yet received a reply.
 
 ##Weird thing 'on the way to the forum' today.##
 
 I remember reading an article a couple of days ago which
 said the compiled 
 version is 10-15% faster than the 'pure PHP' Solr library
 out there, (and it has 
 a lot more capability,that's for sure!)
 
 Turns out, this slower pure PHP version uses
 'file_get_contents()'(FCG) to do 
 the actual query of the Solr Instance. 
 
 
 http://stackoverflow.com/questions/23/file-get-contents-vs-curl-what-has-better-performance
 
 The article above shows that FCG is on average 22% slower
 than using cURL in 
 basic usage. so modifying the 'pure PHP' library with cURL
 would make up for all 
 of the speed that the compiled SolrPHP has.
 
  Dennis Gearon
 
 
 
 
 
 - Original Message 
 From: Lukas Kahwe Smith m...@pooteeweet.org
 To: solr-user@lucene.apache.org
 Sent: Wed, January 12, 2011 2:52:46 PM
 Subject: Re: PHP app not communicating with Solr
 
 
 On 12.01.2011, at 23:50, Eric wrote:
 
  Web page returns the following message:
  Fatal error: Uncaught exception 'Exception' with
 message '0 Status: 
 Communication Error'
  
  This happens in a dev environment, everything on one
 machine: Windows 7, WAMP, 
 CakePHP, Tomcat, Solr, and SolrPHPClient. Error message
 also references line 334 
 of the Service.php file, which is part of the
 SolrPHPClient.
  
  Everything works perfectly on a different machine so
 this problem is probably 
 related to configuration. On the problem machine, I can
 reach solr at 
 http://localhost:8080/solr/admin and it
 looks correct (AFAIK). I am documenting 
 the setup procedures this time around but don't know
 what's different between 
 the two machines.
  
  Google search on the error message shows the message
 is not uncommon so the 
 answer might be helpful to others as well.
 
 
 I ran into this issue compiling PHP with--curl-wrappers.
 
 regards,
 Lukas Kahwe Smith
 m...@pooteeweet.org