PHP SolrClient Connection error
<p>I am using solr server for one of my projects. The manual import and query selection are working fine. Also I am able to get the results from the solr server.
The actual problem is, whenever I tried to update the solr server using the <a href="http://php.net/manual/en/class.solrclient.php" rel="nofollow noreferrer">PHP-SolrClient</a>, it returns error.
The code I have used the below given query for solr updation.</p>
<pre><code>$options = array(
'hostname' =&gt; 'xxx.xxx.xxx.xxx',
'login'    =&gt; '',
'password' =&gt; '',
'port'     =&gt; 8983); 
$client = new SolrClient($options);
$client-&gt;ping();
</code></pre>
<p>But the code returns the following error.</p>
<blockquote>
<p>Warning: SolrClient::ping(): Entity: line 1: parser error : Start tag expected, '&lt;' not found in /var/www/html/test.php on line 132 Call Stack: 0.0095 234296 1. {main}() /var/www/html/test.php:0 0.0096 237776 2. SolrClient-&gt;ping() /var/www/html/test.php:132 Warning: SolrClient::ping(): HTTP/1.1 404 Not Found in /var/www/html/test.php on line 132 Call Stack: 0.0095 234296 1. {main}() /var/www/html/test.php:0 0.0096 237776 2. SolrClient-&gt;ping() /var/www/html/test.php:132 Warning: SolrClient::ping(): ^ in /var/www/html/test.php on line 132 Call Stack: 0.0095 234296 1. {main}() /var/www/html/test.php:0 0.0096 237776 2. SolrClient-&gt;ping() /var/www/html/test.php:132 Warning: SolrClient::ping(): Xpath Error: no elements found in /var/www/html/test.php on line 132 Call Stack: 0.0095 234296 1. {main}() /var/www/html/test.php:0 0.0096 237776 2. SolrClient-&gt;ping() /var/www/html/test.php:132 Fatal error: Uncaught exception 'SolrClientException' with message ' in /var/www/html/test.php on line 132 SolrClientException: Unsuccessful ping request : Response Code 404. HTTP/1.1 404 Not Found Content-Type: text/html; charset=ISO-8859-1 Cache-Control: must-revalidate,no-cache,no-store Content-Length: 300 in /var/www/html/test.php on line 132 Call Stack: 0.0095 234296 1. {main}() /var/www/html/test.php:0 0.0096 237776 2. SolrClient-&gt;ping() /var/www/html/test.php:132</p>
</blockquote>
<p>Can anyone help me to find out what causes the error?</p>