php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59028 Doesn't recognize curl-install
Submitted: 2010-01-13 10:23 UTC Modified: 2014-06-29 15:20 UTC
Votes:8
Avg. Score:4.4 ± 0.9
Reproduced:6 of 7 (85.7%)
Same Version:3 (50.0%)
Same OS:3 (50.0%)
From: smet at smet dot dk Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: 5.2.10 OS: Ubuntu Karmic
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: smet at smet dot dk
New email:
PHP Version: OS:

 

 [2010-01-13 10:23 UTC] smet at smet dot dk
Description:
------------
I have Ubuntu Karmic, and installed php5-curl from repo.

When I do a 'pecl install -o solr-beta' I get:

pecl/solr requires PHP extension "curl"
No valid packages found
install failed

But it IS, and it's activated...


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-13 11:44 UTC] iekpo@php.net
The "curl" php extension needs to be loaded into php itself as an extension.

run this command

php -me

If "curl" is not listed as one of the [PHP Modules] it is not going to work.
 [2010-01-13 11:46 UTC] smet at smet dot dk
$ php -me
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
date
< and a lot more >
 [2010-01-13 11:55 UTC] iekpo@php.net
That is very strange.

I will need some time to duplicate or replicate this observation.

The curl extension is compiled statically into php in my php installation.

I will try to reproduce your error by re-installing php and then setting up the curl extension from the repo.

Give me about 5 days to get back to you.
 [2010-01-13 12:15 UTC] smet at smet dot dk
I could download the file and do:

phpize
./configure
make

and that seemed to work. I now have the extension running. but doing:

pecl install -o solr

still creates the error:

pecl/solr requires PHP extension "curl"
No valid packages found
install failed
 [2010-01-13 15:22 UTC] jamesvl at gmail dot com
I'm on win32 and am getting the same problem.

%php -me reports that curl is loaded, but I still get

   pecl/solr requires PHP extension "curl"

when doing "pecl install solr-beta"

Happens with PHP 5.2.11 and 5.2.12, using the latest PEAR installer.
 [2010-01-13 15:26 UTC] iekpo@php.net
The "pecl install solr-beta" mode of installation is only intended for UNIX systems at this time.

I have not tested this method of installation for windows yet.
 [2010-01-13 15:27 UTC] iekpo@php.net
The "pecl install solr-beta" mode of installation is only intended for UNIX systems at this time.

I have not tested this method of installation for windows yet.
 [2010-01-13 18:07 UTC] jamesvl at gmail dot com
Ah, I didn't realize the PECL command would be compiling the extension from scratch. Documentation doesn't reflect that it's (currently) a Windows-only command. Looks like someone has made a binary available, but for PHP 5.3 only. Too bad.

Ran it on a fresh install of PHP 5.2.12 on latest Ubuntu release and it worked fine though. (Did the ./config with "--with-curl" of course.)
 [2010-02-01 16:59 UTC] mcraft at 360i dot com
I'm having a similar issue still with this pecl extension.

Currently running Ubuntu Karmic.  I have curl install and enabled as a php module

php -me
[PHP Modules]
bcmath
bz2
calendar
ctype
curl
date
<more>

using the following pecl installation command.

sudo pecl install channel://pecl.php.net/solr-0.9.9


thoughts?
 [2010-02-08 17:59 UTC] luke dot crouch at gmail dot com
I got the "pecl/solr requires PHP extension "curl"" error first, then tried to compile and got:

checking for cURL 7.18.0 or greater... configure: error: The Solr extension does not support libcurl libraries < 7.18.0. Please update your libraries
 [2010-02-08 18:38 UTC] luke dot crouch at gmail dot com
Now I got error even with a 7.18+ libcurl installed ...

lcrouch@lcrouch-desktop:~$ sudo pecl install solr
pecl/solr requires PHP extension "curl"
No valid packages found
install failed
lcrouch@lcrouch-desktop:~$ php -me | grep curl
curl
lcrouch@lcrouch-desktop:~$ php -i | grep curl
additional .ini files parsed => /etc/php5/cli/conf.d/curl.ini,
curl
cURL Information => libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.10
 [2010-02-09 10:45 UTC] iekpo@php.net
For some reason if the curl library was not compiled directly into php, you can get this error when installing with pecl instal solr-beta.

Try installing like this after downloading the source:

tar -zxvf solr.0.9.9.tgz

cd solr.0.9.9

phpize

./configure

make && make install

This method should work if you have the right version of libcurl and libxml2
 [2010-02-10 11:13 UTC] luke dot crouch at gmail dot com
Yeah, that worked for me. Good to have a work-around at least.
 [2010-02-10 11:15 UTC] luke dot crouch at gmail dot com
useful tip for others on Ubuntu:

you will also need to install all the -dev packages for libcurl and libxml.
 [2010-04-30 17:40 UTC] iekpo@php.net
This bug has been fixed in SVN.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pecl.php.net.

In case this was a pecl.php.net website problem, the change will show
up on the website in short time.
 
Thank you for the report, and for helping us make PECL better.

The supported versions of libcurl and libxml have been lowered to 7.15.5 and 2.6.26 respectively so there is no need now to build libcurl and libxml2 from source on older RHEL, Fedora Core and CentOS systems.

This is true as of SVN revision 298824
 [2010-05-27 17:52 UTC] office at jb-sys dot de
I still encounter this problem with 0.9.10 on Debian Lenny.

pecl install channel://pecl.php.net/solr-0.9.10
pecl/solr requires PHP extension "curl"
No valid packages found
install failed

php -i | grep curl
/etc/php5/cli/conf.d/curl.ini,
curl
cURL Information => libcurl/7.18.2 OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.8 libssh2/0.18
 [2010-05-31 17:24 UTC] mcglocaltool at yahoo dot com
With old php 5.2.13 fedora core and fresh php 5.3.2 install

./configure w/ php-config or with-curl=shared

curl devel installed and receive this error when try to "make test"


PHP Warning:  Cannot load module 'solr' because required module 'curl' is not loaded in Unknown on line 0

Warning: Cannot load module 'solr' because required module 'curl' is not loaded in Unknown on line 0
PHP Warning:  Cannot load module 'solr' because required module 'curl' is not loaded in Unknown on line 0

Warning: Cannot load module 'solr' because required module 'curl' is not loaded in Unknown on line 0

no need to say "make test fails on all tests"

tried everything here and then some. Solr is running etc.

compiled php with:
--build=i386-redhat-linux-gnu --host=i386-redhat-linux-gnu --target=i586-redhat-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr/bin --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include,/user --libdir=/usr/lib/php/modules --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-debug --with-pic --disable-rpath --with-pear --with-bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf  --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/usr --with-openssl --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets  --with-kerberos  --enable-shmop --enable-calendar --without-mime-magic   --enable-xml --enable-force-cgi-redirect --enable-pcntl --with-imap=shared --with-imap-ssl --enable-mbstring=shared --enable-mbregex --with-ncurses=shared --with-gd=shared --enable-bcmath=shared --enable-dba=shared --with-db4=shared --with-xmlrpc=shared --with-ldap=shared --with-ldap-sasl --with-mysql=shared,/usr/bin/mysql --with-mysqli=shared,/usr/bin/mysql_config --enable-dom=shared  --enable-wddx=shared --enable-soap=shared --with-xsl=shared,/usr --enable-xmlreader=shared --enable-xmlwriter=shared --with-curl=shared,/usr/bin/curl --enable-fastcgi --enable-pdo=shared --with-sqlite=shared --with-pdo-mysql=shared,/usr/bin/mysql   --enable-json=shared --enable-zip=shared  --with-mcrypt=shared,/usr/bin/mcrypt --with-mhash=shared --with-tidy=shared  --enable-posix=shared --with-pdo-sqlite=shared,/usr/bin/sqlite3 --with-apxs2=/usr/sbin/apxs
 [2010-05-31 17:48 UTC] mcglocaltool at yahoo dot com
Changed --with-curl shared to static and it works now
 [2010-05-31 18:25 UTC] mcglocaltool at yahoo dot com
When --with-curl=static is used to compile php. You then can use "pecl install -o solr-beta" and it installs perfectly. If curl is compiled using "shared" it didn't work at all for me.
 [2010-06-23 14:13 UTC] till@php.net
This error persists with when the curl extension is "shared".
 [2010-09-13 17:36 UTC] jmikola at gmail dot com
I had the same problem installing solr on Ubuntu Lucid.

To solve this, I ensured that libxml2-dev and libcurl4-dev (pseudo-package for libcurl4-gnutls-dev) were installed via apt-get.  php5-curl was also installed, but I imagine that's not the curl library that solr depends on.  I then ran `pecl install -n solr-beta` (-n to ignore dependencies) and solr proceeded to check/compile successfully despite the "pecl/solr requires PHP extension curl" warning.
 [2011-07-06 18:52 UTC] mfonda@php.net
This is not an bug with the solr extension, but rather a 
feature of the PEAR installer, specifically the `pecl 
install` command. pecl install passes -n to PHP, so no 
php.ini is used, and thus no shared extensions are loaded. 
For more info on this, see http://pear.php.net/bugs/bug.php?
id=7582

The good news is there are still two easy ways to install 
this if you have curl as a shared extension:

1.) pear install pecl/solr
2.) pecl install -n solr
 [2011-12-05 20:21 UTC] eric dot caron at gmail dot com
Given mfonda's comment on 7/6 about this not being a bug, can the config file be adjusted to provide an error suggesting that "pecl install" be run with the -n flag if the user understands that the curl extension is shared?
 [2012-09-26 18:15 UTC] eric dot caron at gmail dot com
Turns out this bug doesn't even need to exist. The Solr extension requires libcurl directly and doesn't need the PHP cURL extension at all.

(Not sure about libXML - I suspect it isn't needed either but since it is always included it doesn't really matter.)

My GitHub repo has the PHP cURL extension removed and works fine: https://github.com/ecaron/php-pecl-solr
 [2012-12-31 18:21 UTC] ecaron@php.net
-Assigned To: iekpo +Assigned To: ecaron
 [2014-06-19 12:24 UTC] omars@php.net
-Assigned To: ecaron +Assigned To: omars
 [2014-06-29 15:20 UTC] omars@php.net
-Status: Assigned +Status: Closed
 [2014-06-29 15:20 UTC] omars@php.net
fixed in 1.1.0, 2.0.0
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 11:01:30 2024 UTC