Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP Solr PECL Extension installation

I have installed pecl/solr using command,

pecl install solr

and pear using

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

After Restart Apache, i am still getting error

Fatal error: Class 'SolrClient' not found

on php code

 $client = new SolrClient($options);

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

like image 383
Wasim A. Avatar asked Apr 09 '26 07:04

Wasim A.


1 Answers

Just to simplify the procedure:

1 Install extension using

pear install pecl/solr 
OR
pecl install -n solr

2 Add this extension to php ini file

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

3 Restart the server

Service httpd/apache2 restart
like image 144
Sumoanand Avatar answered Apr 11 '26 21:04

Sumoanand



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!