PHP Solr PECL扩展安装 [英] PHP Solr PECL Extension installation

查看:83
本文介绍了PHP Solr PECL扩展安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用命令安装了pecl/solr,

I have installed pecl/solr using command,

pecl install solr

和梨使用

wget http://pear.php.net/go-pear.phar
php go-pear.phar

重新启动Apache 之后,我仍然遇到错误

After Restart Apache, i am still getting error

Fatal error: Class 'SolrClient' not found

关于php代码

 $client = new SolrClient($options);

任何人都可以介绍在Centos上逐步安装pecl/solr扩展程序的情况.

Can any one please describe step by step installation of pecl/solr extension on Centos.

推荐答案

只是为了简化过程:

pear install pecl/solr 
OR
pecl install -n solr

2将此扩展名添加到php ini文件

echo "extension=solr.so" > /etc/<Your php ini path>/php.ini

3重新启动服务器

Service httpd/apache2 restart

这篇关于PHP Solr PECL扩展安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆