Forum Moderators: bakedjake
I've been trying to get cURL installed on PHP, which is running as an Apache 1.3.33 module. This error appears twice in the error_log when I restart the Apache server:
PHP Warning: Unknown(): Invalid library (maybe not a PHP library) 'libcurl.so.3.0.0' in Unknown on line 0
'ldd /usr/local/bin/php' outputs:
linux-gate.so.1 => (0xffffe000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0x4002f000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0x40062000)
libmhash.so.2 => /usr/lib/libmhash.so.2 (0x40081000)
libmcrypt.so.4 => /usr/lib/libmcrypt.so.4 (0x400bb000)
libltdl.so.3 => /usr/lib/libltdl.so.3 (0x400ef000)
libdl.so.2 => /lib/libdl.so.2 (0x400f6000)
libresolv.so.2 => /lib/libresolv.so.2 (0x400fa000)
libm.so.6 => /lib/tls/libm.so.6 (0x4010e000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40131000)
libcurl.so.3 => not found
libc.so.6 => /lib/tls/libc.so.6 (0x40147000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
I'm wondering if that has anything to do with the problem. However, I'm not sure where PHP is looking for libcurl.so.3.0.0. Is there a shell command that would tell me that? I'm pretty new to linux (and it rocks!).
I've tried everything I can think of to resolve this issue and I'm out of ideas. Any help would be greatly appreciated.
Thanks,
Geoff
Here's some more details that might be useful...
I'm trying to install on Suse 9.2
I installed cURL with these commands:
./configure --prefix=/usr/local --with-ssl=/usr/local/ssl
make
make test
make install
Here is the output from running 'make test':
TESTDONE: 268 tests out of 269 reported OK: 99%
TESTFAIL: These test cases failed: 241
TESTDONE: 285 tests were considered during 118 seconds.
TESTINFO: 16 tests were skipped due to these restraints:
TESTINFO: "no stunnel" 8 times (300, 301, 302, 303, 304, 305, 306, 509)
TESTINFO: "rlimit problems" 1 times (518)
TESTINFO: "curl lacks idn support" 1 times (165)
TESTINFO: "curl lacks netrc_debug support" 6 times (130, 131, 132,
133, 134, 257)
make[1]: *** [quiet-test] Error 1
make[1]: Leaving directory `/usr/local/src/curl-7.14.0/tests'
make: *** [test] Error 2
Here is what is in the /usr/local/src/php-4.3.11/run.sh file I created:
CPPFLAGS="-I/usr/local/include"
LDFLAGS="-L/usr/local/lib -lstdc++"
./configure --prefix=/usr/local \
--with-apache=/usr/local/src/apache_1.3.33 \
--enable-exif \
--enable-track-vars \
--enable-calendar \
--enable-magic-quotes \
--enable-trans-sid \
--enable-wddx \
--enable-ftp \
--enable-inline-optimization \
--enable-memory-limit \
--enable-dbase \
--with-curl=/usr/local \
--with-zlib \
--with-expat-dir="/usr" \
--with-mbstring \
--with-mhash="/usr" \
--with-mcrypt="/usr" \
--with-openssl="/usr/local/ssl" \
--with-kerberos \
--enable-sysvsem \
--enable-sysvshm \
--enable-bcmath \
--with-gettext="/usr" \
--with-mysql="/usr/local/mysql" \
--without-mm
cURL is detected after running ./run.sh in the PHP-4.3.11 directory:
checking for CURL support... yes, shared
checking for CURL in default path... found in /usr/local
checking for cURL 7.9.8 or greater... libcurl 7.14.0
checking for curl_easy_perform in -lcurl... (cached) yes
checking for curl_version_info in -lcurl... (cached) yes
In the php.ini file, I have:
extension_dir = "/usr/local/lib"
extension=libcurl.so.3.0.0
phpinfo() Configure Command:
'./configure' '--prefix=/usr/local'
'--with-apache=/usr/local/src/apache_1.3.33' '--enable-exif'
'--enable-track-vars' '--enable-calendar' '--enable-magic-quotes'
'--enable-trans-sid' '--enable-wddx' '--enable-ftp'
'--enable-inline-optimization' '--enable-memory-limit'
'--enable-dbase' '--with-zlib' '--with-expat-dir=/usr'
'--with-mbstring' '--with-mhash=/usr' '--with-mcrypt=/usr'
'--with-openssl=/usr/local/ssl' '--with-kerberos' '--enable-sysvsem'
'--enable-sysvshm' '--enable-bcmath' '--with-gettext=/usr'
'--with-mysql=/usr/local/mysql' '--without-mm'
PHP is running as an apache module
If I try to run a PHP script with any cURL functions in it, these errors show up in the error_log:
[error] PHP Fatal error: Call to undefined function: curl_init() in
/home/abc/public_html/curl.php on line 8