solr php extension fails to run on newest Debian Wheezy

Posted by hijarian on Server Fault See other posts from Server Fault or by hijarian
Published on 2012-07-02T11:51:43Z Indexed on 2012/11/29 5:07 UTC
Read the original article Hit count: 643

Filed under:
|
|

I'm trying to use the Solr PHP extension on the recently-upgraded Debian Wheezy. It installs both from PECL and from sources flawlessly but instead of giving me expected functionality it gives me this on every PHP run:

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

Also scripts which use the extension throws an error

PHP Error[2]: include(SolrClient.php): failed to open stream: 
No such file or directory in file <...path to my autoloader...>

My main point is that it was set up before and worked like a charm. In the upgrade among the relevant packages only the versions of PHP and libcurl was changed. Instance of Solr itself was left as is.

I have all possible libcurl libraries:

$ locate libcurl
...
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.2.0
/usr/lib/x86_64-linux-gnu/libcurl.a
/usr/lib/x86_64-linux-gnu/libcurl.la
/usr/lib/x86_64-linux-gnu/libcurl.so
/usr/lib/x86_64-linux-gnu/libcurl.so.3
/usr/lib/x86_64-linux-gnu/libcurl.so.4
/usr/lib/x86_64-linux-gnu/libcurl.so.4.2.0
...
/usr/lib32/libcurl.so.3
/usr/lib32/libcurl.so.4
/usr/lib32/libcurl.so.4.2.0
...

I have instaled the php5-curl package version 5.4.4-2 with aptitude.

I installed the Sorl extensions both with

sudo pecl install solr

(with various combinations of -f and -n flags and tried solr-beta too) and with

wget ...
cd ...
phpize
./configure
make 
make install

I'm installing the 1.0.2 version of extension because it worked before the upgrade from Squeeze to Wheezy. As I said earlier, extension installs without any errors.

I have already added the extension=solr.so incantation to the /etc/php5/mods-available/solr.ini

What magic should I do to make solr extension work? Is this true that the only solution that I have is to downgrade the libcurl version as it was before the upgrade?

© Server Fault or respective owner

Related posts about php5

Related posts about solr