简体   繁体   English

php SOLR 扩展未在 wamp 中加载

[英]php SOLR extension is not loaded in wamp

I am trying to configure SOLR on PHP and using WAMP.Added extension in php.ini also pasted the php_solr.dll in the extension directory. I am trying to configure SOLR on PHP and using WAMP.Added extension in php.ini also pasted the php_solr.dll in the extension directory.

Unfortunately the extension details is not appearing in my php info.不幸的是,扩展详情没有出现在我的 php 信息中。

I am just confused that may be I am missing any configuration step/我只是很困惑,可能是我错过了任何配置步骤/

Thanks in advance.提前致谢。

If you are using Linux then go to /etc/php5/apache2/conf.d/ .如果您使用 Linux 然后 go 到/etc/php5/apache2/conf.d/ If you find another .ini then create a solr.ini file, add the following line and restart the Apache service.如果发现另一个.ini则创建solr.ini文件,添加以下行并重新启动 Apache 服务。

extension=solr.so

See my blog post for more information.有关更多信息,请参阅我的博客文章。 Let me know if you need more help.如果您需要更多帮助,请告诉我。

Installing Solr on Windows with Wamp使用 Wamp 在 Windows 上安装 Solr

Solr is a great tool for full-text searching and more, from Apache Software Foundation. Solr 是一款出色的全文搜索工具,来自 Apache Software Foundation。 Its based on Apache Lucene search library and extends it.它基于 Apache Lucene 搜索库并对其进行了扩展。 In this post I will let you know how to install Solr on Windows and integrating it with WAMP.在这篇文章中,我将告诉您如何在 Windows 上安装 Solr 并将其与 WAMP 集成。 Integration with WAMP is not mandatory if you are not using it.如果您不使用它,则不需要与 WAMP 集成。

The esyest way to install solr on Windows is to use Solr installer from BitNami.在 Windows 上安装 solr 的最简单方法是使用来自 BitNami 的 Solr 安装程序。 This can be found here http://bitnami.com/stack/solr .这可以在这里找到http://bitnami.com/stack/solr Download the installer and run it with administrative rights.下载安装程序并使用管理权限运行它。 Try to keep the installation path simple something like “c:/solr/” will be appropriate.尽量保持安装路径简单,例如“c:/solr/”将是合适的。

It will also install an apache server so if you don't have wamp or apache already install than its super easy, just go with the flow.它还将安装一个 apache 服务器,所以如果你没有 wamp 或 apache 已经安装,比它超级容易,只需 go 即可。 If you already have wamp installed than make this apache listen on some available port other than 80 (where wamp apache is listening).如果您已经安装了 wamp,则让这个 apache 监听除 80 以外的某些可用端口(wamp apache 正在监听)。

Once the setup is complete Solr will be available for use in port selected during setup (see no big deal).设置完成后,Solr 将可用于设置期间选择的端口(没什么大不了的)。 Now if you have wamp and you don't want to have two apache services running do the following steps.现在,如果您有 wamp 并且不想让两个 apache 服务运行,请执行以下步骤。

Enable proxy_module and proxy_http_module via wamp menu or directly from apache conf file.
Open httpd.conf file and add following line at the end of the file

Include "c:/solr/apache-solr/conf/solr.conf"

Note that the path here should be correctly pointing to the solr.conf file. Use the path where you installed the Solr.
Now restart the wamp apache via wamp menu. If it starts correctly than its cool, otherwise check if you have correctly enabled the said modules, and path to solr config file.
Now check http://localhost/solr/ this should show the dashboard for solr.
Remember the extra apache service we need to disable it so it does not start automatically as we don’t need it. So goto Control Panel > Administrative Tools > Services , double click “solrApache” service and change its “Startup Type” to “Manual”. Now it will not start once your system is restated.

Happy solr searching快乐 solr 搜索

I couldn't get that plugin to work and ended up going for solr-php-client from http://code.google.com/p/solr-php-client/我无法使该插件正常工作,最终从http://code.google.com/p/solr-php-client/使用 solr-php-client

It does everything you need it to and you can include_once it into your scripts and know that you can deploy them on a standard PHP installation.它可以完成您需要做的所有事情,您可以将其包含在您的脚本中,并且知道您可以将它们部署在标准的 PHP 安装上。

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

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