Solr for PHP on Heroku

I’ve been using Solr for querying skills on Referbase and when I moved the codes to Heroku, I was not be able to use Solr. Because Heroku does not officially support PHP and they’d not like to help me find a workaround to use it. The warning I was getting from Apache is as follows:

PHP Warning: PHP Startup: Unable to load dynamic library ‘/app/www/ext/solr.so’ – /lib/libc.so.6: version `GLIBC_2.14′ not found (required by /app/www/ext/solr.so) in Unknown on line 0

So, how did I solve it? I did not. I asked for help on StackOverflow: http://stackoverflow.com/questions/19161090/solr-for-php-gives-glibc-2-14-not-found-error-on-heroku but nobody knew how to solve it. Then I have found a JS client for Solr but it wasn’t enough to accomplish all I needed. Then, I have found another PHP client for Solr and wrote and answer to my own problem:

It seems that there are no direct solutions but I have found a workaround. Instead of using solr.soextension, one can use open-source solr-php-client from here. It does note require a compiler, so no apache errors on Heroku.

Apparently, yo do not need to have a native php extension; just use this client to work on Heroku.

Leave a Reply