yaron
yaron

Reputation: 1333

how to instal php-solr-client on aws beanstalk with pecl

i have installed a beanstalk server on amazon aws. i also have a different instance running SOLR server.

in my php scripts i use this module: http://php.net/manual/en/solrclient.adddocument.php to query the SOLR database.

to install it on beanstalk, i login into its ec2 instance, (ec2-user). this module uses pecl

in the ec2 shell:

sudo pecl install -n solr

once done, pecl will add extension = solr.so to php.ini

from this point, when i run php scripts i recive:

PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/solr.so' - /usr/lib/php/modules/solr.so: undefined symbol: curl_easy_getinfo in Unknown on line 0

i found a very few other posts about this issue, but most gave up or gave incomplete/unclear solutions.

Upvotes: 2

Views: 1613

Answers (2)

Lloyd
Lloyd

Reputation: 183

Yaron's reply Didnt work for me.

However the below did.

i simply added

extension=curl.so
extension=json.so
extension=solr.so

at the end of php.ini and it worked without any issues.

Note: i am using php 5.5.12

Upvotes: 0

yaron
yaron

Reputation: 1333

how to install solr php client on aws beanstalk - (this php client - http://php.net/manual/en/solrclient.construct.php)

  1. assumming you have beanstalk server up and running
    • login into ec2 instance created by beanstalk
  2. sudo pecl install -n solr -> (add /usr/lib as a location folder when prompt for xmlcurl,libcur while installing via pecl)
  3. delete “extension=solr.so” from php.ini -> (found in root/etc)
  4. add file "solr.ini" with one line = (put in root/etc/php.d)
  5. sudo /etc/init.d/httpd restart -> restart the server
    • make sure solr server ports 8443 : 8983 are open for beanstalk.
  6. profit.
  7. now that this is running, if you are running this to connect to solr 4.0 server you will notice that it will not work correctly (commit -> waitflush arg was removed in 4.0 but still exists on the client)
  8. no profit for me...

Upvotes: 1

Related Questions