0
我正在使用nelmio/solarium-bundle
。我已经完成了这个包,但我有错误在运行这个测试文件:在此服务器上找不到请求的URL/solr/admin/ping
Symfony/vendor/solarium/solarium/examples/1.1-check-solarium-and-ping.php
这是错误:
Fatal error: Uncaught exception 'Solarium\Exception\HttpException' with message ' in C:\wamp\www\Symfony2\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103
Solarium\Exception\HttpException: Solr HTTP error: OK (404) <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL /solr/admin/ping was not found on this server.</p> <hr> <address>Apache/2.4.9 (Win64) PHP/5.5.12 Server at 127.0.0.1 Port 80</address> </body></html> in C:\wamp\www\Symfony2\vendor\solarium\solarium\library\Solarium\Core\Query\Result\Result.php on line 103
这是捆绑的配置在我config.yml
:
nelmio_solarium: ~
我已修改config.dist.php
文件:
$config = array(
'endpoint' => array(
'localhost' => array(
'host' => '127.0.0.1',
'port' => null,
'path' => '/solr',
)
)
);
的可能重复[HttpException:Solr的HTTP错误:HTTP请求失败,无法连接到127.0.0.1端口8983:连接被拒绝(HTTP:// stackoverflow.com/questions/25597255/httpexception-solr-http-error-http-request-failed-failed-to-connect-to-127-0) – lxg 2014-09-02 09:59:26
你还没有设置你的Solr服务器,是吗? http://stackoverflow.com/questions/25597255/httpexception-solr-http-error-http-request-failed-failed-to-connect-to-127-0 – lxg 2014-09-02 09:59:43
事实上,你已经安装了一个Solr客户端软件包Symfony与运行Solr服务器本身无关。再一次:Solr是一个*独立服务器*。日光浴场只是该服务器的*客户*。 NelmioSolariumBundle不包含Solr服务器。您需要下载,安装,配置和启动Solr服务器。 – lxg 2014-09-02 10:06:18