简体   繁体   English

如何解决致命错误:找不到类'SolrClient'?

[英]How to fix Fatal error: Class 'SolrClient' not found?

I am trying to run to use the SolrClient PHP extension but I am unable to do so successfully. 我正在尝试运行以使用SolrClient PHP扩展,但无法成功使用。 I did everything in this tutorial. 我在教程中做了所有操作。 But I keep getting the following error every time I try to create an object of the SolrClient class: 但是,每次尝试创建SolrClient类的对象时,都会不断出现以下错误:

Fatal error: Class 'SolrClient' not found in /...

Server running: 服务器正在运行:

  1. CENTOS 6.7 x86_64 standard CENTOS 6.7 x86_64标准
  2. WHM 11.52.0 (build 23) WHM 11.52.0(内部版本23)

Apache Solr: Apache Solr:

solr-spec    5.3.1
solr-impl    5.3.1 1703449 - noble - 2015-09-17 01:48:15
lucene-spec  5.3.1
lucene-impl  5.3.1 1703449 - noble - 2015-09-17 01:38:09

JVM: Oracle Corporation OpenJDK 64-Bit Server VM (1.8.0_65 25.65-b01) JVM: Oracle Corporation OpenJDK 64-Bit Server VM (1.8.0_65 25.65-b01)

Installed required extensions: 已安装所需的扩展:

  1. libxml2 libxml2
  2. curl 卷曲

Solved by going to the WHM cpanel >> Software >> Module Installers >> PHP Pecl Manager 通过转到WHM cpanel解决>>软件>>模块安装程序>> PHP Pecl Manager

Then I searched for Solr then clicked install. 然后我搜索了Solr,然后单击安装。

You might need to install curl-devel, pcre-devel before you install Solr module like so: 在安装Solr模块之前,可能需要先安装curl-devel,pcre-devel,如下所示:

yum install curl-devel
yum install pcre-devel

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

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