Installing Apache Solr on Windows WAMP Server

Posted on June 3, 2014, 2:40 pm by

Because I use more Windows than Linux I've tried to bring all the services I use on Linux on Windows. This was a big challenge! 
In this brave journey I arrived at Apache Solr installation on WAMP server. The installation was really easy, involving the use of Bitnami and following the steps from the Bitnami tutorial.

The hard part was the integration with PHP: the installation of the php_solr.dll for the current PHP version used by the WAMP server, meaning the PHP 5.4.12. 
Unfortunately there is no such php_solr.dll library that could work with WAMP server. I've tried the ones from here, here and here , but with no success.
The extension appears on the WAMP interface, I've activated it, but when I run a test script, like this:

$options = array(
            'hostname'  => '',
            'port'      => 8080,
            'path'      => '/solr/collection1'

$client = new SolrClient($options);

, it doesn't recognize the PHP Solr library class. It exits with the following error:

Fatal error: Class 'SolrClient' not found in C:\wamp\www\solr\test.php on line 7

In the Apache log appears the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.12/ext/php_solr.dll' - %1 is not a valid Win32 application.\r\n in Unknown on line 0

After a while I discovered that there is no functional Solr library for this version of PHP on WAMP. Sad!

Using LAMP things went a lot more easy and fast!

Related articles:

Leave a Comment:


Blog Search

Popular Blog Categories


Want to be informed about latest posts? Subscribe to our newsletter