about-dev.com
about-dev.com

Reputation: 11

Installing Apache Solr on Windows WAMP Server

I tried to install Apache Solr on WAMP server (in Windows) and I succeeded but the problem was that I couldn't use the PHP Solr library on this environment. The error I keep getting is:

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.

I've downloaded, included and activated the dll file containing the PHP Solr library but this error keeps comming.

PHP version: 5.4.12
Wampserver version: 2.4

Upvotes: 1

Views: 2105

Answers (1)

Geo Salameh
Geo Salameh

Reputation: 333

  1. First you need to make sure JAVA is installed on your windows machine; if not, make sure to download it from here https://www.java.com/en/download/
  2. Download Apache Solr library from http://lucene.apache.org/solr/mirrors-solr-latest-redir.html (to download older version go to https://archive.apache.org/dist/lucene/solr/)
  3. Extract downloaded Apache Solr archive (i.e. in C:\wamp\apache-solr-4.0.0)
  4. If you're setting up Solr to work with Drupal, you need to copy some additional files to C:\wamp\apache-solr-4.0.0\example\solr\collection1 [optional]
  5. Launch Windows Command Prompt (to launch RUN press win+R on your keyboard, then type "cmd" without the quotes, and click OK)
  6. In Command Prompt window; change directory to Apache Solr example folder location, i.e. cd c:\wamp\apache-solr-4.0.0\example\
  7. Also, in Command Prompt; type the following command java -jar start.jar

    NOTE: Command Prompt should be kept open since Solr service is running. If you close it the service will stop.

  8. This will start jetty webserver and deploy Solr automatically

  9. Now you can access Solr GUI from browser by going to http://localhost:8983/solr

Upvotes: 1

Related Questions