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.

Nasıl Ünlü Oldu?

Dün gece AKP’ye kapatma davasını açanın kim olduğunu düşünürken, aklıma Abdurrahman Yalçınkaya geldi. İnternette arattım, birçok site kendisinin sadece Yargıtay Cumhuriyet Başsavcısı olduğunu yazmış. İsmini neden bildiğimizi yazmamış (sebep: DTP ve AKP kapatma davaları).

Ben de oturdum, 5 saat gibi bir sürede aşağıdaki web sitesini yaptım:

www.nasilunluoldu.com

Şu an sadece birkaç girdi var ama isteyen herkes anonim olarak girdi ekleyebiliyor. Aklınızda bir isim varsa ama bu ismi nerden bildiğinizi hatırlayamıyorsanız, arama kutucuğuna yazın, size söylesin. Tabii şu anda kesin olarak söylemesi imkansız, çünkü sitede pek veri yok ama zamanla bir veri deposu haline gelebileceğini düşünüyorum. 🙂

Birazcık teknik detaylardan bahsedelim. PHP ve MySQL kullandım. Arkaplanda lightweight framework CodeIgniter var.

Technical Service Tracking Automation

– Dev’d

  • for Rüzgar Bilişim
  • on February 2012

– Powered by

  • PHP
  • MySQL
  • CSS
  • CodeIgniter

v1.2.0 Version Notes (updated on: Feb 21, 2012)

– Added to the abilities of Administrator

  • Save and edit forms without sending e-mails
  • Send notification e-mails when the form is edited
  • New attributes are added to the service form
  • Add multiple license numbers

– Fixed

  • Slipped user-interface

v1.1.0 Version Notes (updated on: Feb 15, 2012)

– Added to the abilities of Administrator

  • Edit customer info (including username, password, customer title and -coming from previous version: license no)
  • Edit technical service forms
  • Save edited technical service forms as PDF or HTML
  • Delete customer
  • Delete technical service form

v1.0.0 Version Notes

– Authentication System

  • Administrator of the Technical Service
  • Customers of the Technical Service
  • Both levels of auth system are able to log in with username and password

– Administrators are able to

  • See all the customers
  • Change customers’ information (their unique license code)
  • Add customers
  • Open a technical service form to be billed later for customers
  • See all the technical service forms of customers that were opened before
  • Change his/her own information (including e-mail)
  • Send e-mail to the particular customer that includes technical service form

– Customers are able to

  • See his/her license key
  • See his/her old technical service forms that associated with

– Both user levels are able to

  • Save the technical service form as HTML or PDF document
  • Print the technical service form

Editör v2.0.1a

v2.0.1a Version Notes

– Added

  • Prices are sorted by Quicksort Algorithm.
  • Prefixes are splitted with their countries. It helps to reduce time on calculating prices.
  • Prefixes which start with “1” (USA) or “7” (Russia) are checked for belonging to the right country.

– Updated

  • Sorting algorithm of prices are changed.

Editör v2.0.0a

v2.0.0a Version Notes

– Added

  • creating cost list by the costs coming from numerous operators (at least 2).
  • applying a formula including tax, currency and profit rates.
  • showing costs by at least 2 to at most 5 opeators minimum to maximum by every cost’s operator name.
  • (temporarily) generating excel output of costs by specified queue (for example: for Afghanistan costs, get all the second minimum prices given by the operators.)

Special Notes

The temporary feature that generates excel output is added for working with these prices on the first version of Editör.