Installing the PHP-SOLR extension
Download the installation:
LIBXML2 2.6.31 or later
Libcurl 7.18.0 or later
Download SOLR:HTTP://PECL.PHP.NET/PACKAGE/SOLR on the PHP website
And then:
/usr/local/php5/bin/phpize./configure--with-php-config=/usr/local/php5/bin/php-config sudo make sudo make test sudo Make install
After installation, there will be a hint like this:
Installing Shared extensions:/usr/local/lib/php/extensions/no-debug-non-zts-20090626/
Keep this in mind and then modify PHP.ini (Vim/usr/local/etc/php.ini) to put
Extension_dir = "./"
Revision changed to
Extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/"
and add a row
Extension=solr.so
Note:/usr/local/php5/bin/phpize may change depending on the location of the PHP installation.
Related articles:
PHP's SOLR operation class and demo
Search Scenario solr+php How do I install the configuration?
Integrated PHP application and SOLR search engine