문제

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;

 ?>
도움이 되었습니까?

해결책

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

다른 팁

Have you tried using line command

wget -O- "http://solr_ip_adress.lan:8080/solr/admin/registry.jsp" | grep 'solr-spec-version'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top