Question

I have installed php, php solrclient and php-pecl-solr and using solr 4.6.1. The Solr works properly through the UI(solr admin page) but when I try to give any command through a php file, the command doesn't return anything and is possibly not even working. How can I check if the required modules are installed and running properly. Even the following code doesn't display anything on the page.

 <?php

  $solr_version = solr_get_version();

  print $solr_version;

 ?>
Was it helpful?

Solution

Have you tried using php_info()?

<?php 
php_info();
?>

This shows a list of all installed modules, extension etc. See the documentation for more details - https://www.php.net/manual/en/function.phpinfo.php

OTHER TIPS

Have you tried using line command

wget -O- "http://solr_ip_adress.lan:8080/solr/admin/registry.jsp" | grep 'solr-spec-version'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top