Report this

What is the reason for this report?

getting PHP - Solr error - Unable to load dynamic library

Posted on September 1, 2014

I’m trying to access my file containing php solr code but I’m getting following error. PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20121212/solr.ini’ - /usr/lib/php5/20121212/solr.ini: cannot open shared object file: No such file or directory in Unknown on line 0



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Judging from the error, one of your php configuration files has something like:

extension=/usr/lib/php5/20121212/solr.ini

in it. This tell php to try and load that as a shared library file, but it is an ini file not a so Find the file that contains that line and remove it. What’s the output of:

grep -Hrv ";" /etc/php5 | grep -i "extension="

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.