Topic: php-curl on CentOS 5?

I've been using the PHP packages from the Remi repo on CentOS 5.5 for a while. When I recently updated them to PHP 5.3.8, the curl support disappeared, and there is no separate php-curl package to install. It seems that php-common used to include curl support but no longer does? Was it removed intentionally? Is there some other compatible way to add it?

I find the repo very useful. Thanks for any help.

Re: php-curl on CentOS 5?

Hum...

Which version have you install ?

* php-5.3.8-1.el5.remi from remi => curl support still enabled, as always, against old system curl (7.15)

* php-5.3.8-1.el5.remi.1 from remi-test => curl support still enabled, against new licurl (7.21) also available in the remi-test repository

Can you run:

$ rpm -q php curl libcurl
$ ldd /usr/lib*/php/modules/curl.so
$ php -m | grep curl
$ php -i | grep -i curl
Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-curl on CentOS 5?

Is your OS fully updated ?
Especially openldap, so

$ ldd /usr/lib*/libcurl.so.4
$ rpm -q openldap
kcivey wrote:

When it starts I get this:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/curl.so' - /usr/lib64/libcurl.so.4: undefined symbol: ldap_init_fd in Unknown on line 0

From openldap changelog

* ven jan 21 2011 Jan Vcelak <jvcelak@redhat.com> 2.3.43-12.5
- backport: ldap_init_fd() API function (#671341)

So, I think you need, at least version >= 2.3.43-12.5

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-curl on CentOS 5?

$ rpm -q php curl libcurl
php-5.3.8-2.el5.remi
curl-7.21.7-4.el5.remi
libcurl-7.21.7-4.el5.remi

$ ldd /usr/lib*/php/modules/curl.so
    libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00002b6a1ea0c000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b6a1ec66000)
    libidn.so.11 => /usr/lib64/libidn.so.11 (0x00002b6a1efbd000)
    libldap-2.3.so.0 => /usr/lib64/libldap-2.3.so.0 (0x00002b6a1f1ef000)
    librt.so.1 => /lib64/librt.so.1 (0x00002b6a1f429000)
    libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b6a1f632000)
    libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b6a1f861000)
    libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b6a1faf6000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b6a1fd1b000)
    libz.so.1 => /usr/lib64/libz.so.1 (0x00002b6a1ff1e000)
    libssl3.so => /usr/lib64/libssl3.so (0x00002b6a20132000)
    libsmime3.so => /usr/lib64/libsmime3.so (0x00002b6a20368000)
    libnss3.so => /usr/lib64/libnss3.so (0x00002b6a20593000)
    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00002b6a208c0000)
    libplds4.so => /usr/lib64/libplds4.so (0x00002b6a20ade000)
    libplc4.so => /usr/lib64/libplc4.so (0x00002b6a20ce2000)
    libnspr4.so => /usr/lib64/libnspr4.so (0x00002b6a20ee6000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b6a21121000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00002b6a2133d000)
    libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00002b6a21541000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c71000000)
    liblber-2.3.so.0 => /usr/lib64/liblber-2.3.so.0 (0x00002b6a21764000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b6a21973000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00002b6a21b88000)
    libssl.so.6 => /lib64/libssl.so.6 (0x00002b6a21da1000)
    libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b6a21fee000)
    libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b6a2233f000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b6a22547000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002b6a2274a000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b6a22982000)
    libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b6a22b9b000)

$ php -m | grep curl
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/curl.so' - /usr/lib64/libcurl.so.4: undefined symbol: ldap_init_fd in Unknown on line 0

$ php -i | grep -i curl
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/curl.so' - /usr/lib64/libcurl.so.4: undefined symbol: ldap_init_fd in Unknown on line 0
Configure Command =>  './configure'  '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--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-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-mhash' '--enable-force-cgi-redirect' '--enable-pcntl' '--with-imap=shared' '--with-imap-ssl' '--enable-mbstring=shared' '--enable-mbregex' '--with-gd=shared' '--enable-bcmath=shared' '--enable-dba=shared' '--with-db4=/usr' '--with-xmlrpc=shared' '--with-ldap=shared' '--with-ldap-sasl' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/lib64/mysql/mysql_config' '--with-oci8=shared,instantclient,/usr/lib64/oracle/11.2/client64/lib,11.2' '--with-pdo-oci=shared,instantclient,/usr,11.2' '--with-interbase=shared,/usr/lib64/firebird' '--with-pdo-firebird=shared,/usr/lib64/firebird' '--enable-dom=shared' '--with-pgsql=shared' '--enable-wddx=shared' '--with-snmp=shared,/usr' '--enable-soap=shared' '--with-xsl=shared,/usr' '--enable-xmlreader=shared' '--enable-xmlwriter=shared' '--with-curl=shared,/usr' '--enable-fastcgi' '--enable-pdo=shared' '--with-pdo-odbc=shared,unixODBC,/usr' '--with-pdo-mysql=shared,/usr/lib64/mysql/mysql_config' '--with-pdo-pgsql=shared,/usr' '--with-pdo-sqlite=shared,/usr' '--with-pdo-dblib=shared,/usr' '--without-sqlite3' '--with-sqlite=shared,/usr' '--enable-json=shared' '--enable-zip=shared' '--without-readline' '--with-libedit' '--with-pspell=shared' '--enable-phar=shared' '--with-mcrypt=shared,/usr' '--with-tidy=shared,/usr' '--with-mssql=shared,/usr' '--enable-sysvmsg=shared' '--enable-sysvshm=shared' '--enable-sysvsem=shared' '--enable-posix=shared' '--with-unixODBC=shared,/usr' '--enable-fileinfo=shared' '--enable-intl=shared' '--with-icu-dir=/usr' '--with-enchant=shared,/usr' '--with-recode=shared,/usr'
/etc/php.d/curl.ini,
libcurl => 7.15.5 => 7.15.5

$ ldd /usr/lib*/libcurl.so.4
    libidn.so.11 => /usr/lib64/libidn.so.11 (0x00002b0d99d08000)
    libldap-2.3.so.0 => /usr/lib64/libldap-2.3.so.0 (0x00002b0d99f39000)
    librt.so.1 => /lib64/librt.so.1 (0x00002b0d9a173000)
    libgssapi_krb5.so.2 => /usr/lib64/libgssapi_krb5.so.2 (0x00002b0d9a37d000)
    libkrb5.so.3 => /usr/lib64/libkrb5.so.3 (0x00002b0d9a5ab000)
    libk5crypto.so.3 => /usr/lib64/libk5crypto.so.3 (0x00002b0d9a840000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00002b0d9aa66000)
    libz.so.1 => /usr/lib64/libz.so.1 (0x00002b0d9ac68000)
    libssl3.so => /usr/lib64/libssl3.so (0x00002b0d9ae7c000)
    libsmime3.so => /usr/lib64/libsmime3.so (0x00002b0d9b0b3000)
    libnss3.so => /usr/lib64/libnss3.so (0x00002b0d9b2dd000)
    libnssutil3.so => /usr/lib64/libnssutil3.so (0x00002b0d9b60a000)
    libplds4.so => /usr/lib64/libplds4.so (0x00002b0d9b829000)
    libplc4.so => /usr/lib64/libplc4.so (0x00002b0d9ba2c000)
    libnspr4.so => /usr/lib64/libnspr4.so (0x00002b0d9bc30000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b0d9be6c000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00002b0d9c087000)
    libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00002b0d9c28b000)
    libc.so.6 => /lib64/libc.so.6 (0x00002b0d9c4af000)
    liblber-2.3.so.0 => /usr/lib64/liblber-2.3.so.0 (0x00002b0d9c806000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00002b0d9ca14000)
    libsasl2.so.2 => /usr/lib64/libsasl2.so.2 (0x00002b0d9cc2a000)
    libssl.so.6 => /lib64/libssl.so.6 (0x00002b0d9ce43000)
    libcrypto.so.6 => /lib64/libcrypto.so.6 (0x00002b0d9d08f000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003c71000000)
    libkrb5support.so.0 => /usr/lib64/libkrb5support.so.0 (0x00002b0d9d3e1000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00002b0d9d5e9000)
    libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002b0d9d7ec000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b0d9da24000)
    libsepol.so.1 => /lib64/libsepol.so.1 (0x00002b0d9dc3d000)

$ rpm -q openldap
openldap-2.3.43-12.el5_5.3

Re: php-curl on CentOS 5?

Sorry for the duplicate earlier. Somehow I never saw that my earlier question had gotten through moderation and been answered. I thought it was still hidden (plus I had the additional info about ldap).

Re: php-curl on CentOS 5?

So, try to update openldap to latest version (2.3.43-12.el5_6.7)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-curl on CentOS 5?

Ah, that did it.  I thought I updated openldap this morning and had the newest version available, but I guess not. But shouldn't the dependencies in php-common or in libcurl be set to require that openldap version?

Anyway, thanks very much!

Re: php-curl on CentOS 5?

kcivey wrote:

But shouldn't the dependencies in php-common or in libcurl be set to require that openldap version?

Yes.

But you are using "remi-test" repository, which provides some experimental changes which can introduce such small issues.
It will be fixed in next libcurl build.

kcivey wrote:

Anyway, thanks very much!

Great !

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: php-curl on CentOS 5?

Well If you have not set the default timezone for dates, you will get PHP warnings and in some cases fatal errors (e.g. when using the DateTime object).