简体   繁体   English

如何检查 php-pecl-solr 是否正确安装?

[英]How can I check if php-pecl-solr is properly installed?

I have installed php, php solrclient and php-pecl-solr and using solr 4.6.1.我已经安装了 php、php solrclient 和 php-pecl-solr 并使用了 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. Solr 通过 UI(solr 管理页面)正常工作,但是当我尝试通过 php 文件发出任何命令时,该命令不返回任何内容,甚至可能无法正常工作。 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_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这显示了所有已安装模块、扩展等的列表。有关更多详细信息,请参阅文档 - https://www.php.net/manual/en/function.phpinfo.php

您是否尝试过使用 line 命令

wget -O- "http://solr_ip_adress.lan:8080/solr/admin/registry.jsp" | grep 'solr-spec-version'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM