Bug #81276 [Opn]: Using curl/libcurl with NSS backend fails to load curl extension

From: Date: Fri, 23 Jul 2021 15:30:49 +0000
Subject: Bug #81276 [Opn]: Using curl/libcurl with NSS backend fails to load curl extension
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-235313@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=81276&edit=1 ID: 81276 User updated by: 1001malac at gmail dot com Reported by: 1001malac at gmail dot com Summary: Using curl/libcurl with NSS backend fails to load curl extension Status: Open Type: Bug Package: cURL related Operating System: Debian 10.10 PHP Version: 7.4.21 Block user comment: N Private report: N New Comment: I'm running under Debian 10. apt-get source curl modified the rules to my liking, removed slack, compile with debuild, install. Only curl got recompiled. I've tried 7.3 as it's the version provided with the distro, then also tried with the semi official Sury's php 7.4 packages and it's the same. Previous Comments: ------------------------------------------------------------------------ [2021-07-23 06:05:16] cmb@php.net Did you build PHP yourself, or are you using a pre-built PHP from your distro/PPA? ------------------------------------------------------------------------ [2021-07-22 23:35:27] 1001malac at gmail dot com Well, forget the previous one, this is it: linux-vdso.so.1 (0x00007fff701f9000) libcurl.so.4 => /lib/x86_64-linux-gnu/libcurl.so.4 (0x00007fb7049b2000) libplds4.so => /lib/x86_64-linux-gnu/libplds4.so (0x00007fb7049ad000) libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007fb70496c000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fb70474e000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fb70472d000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fb70456c000) libnghttp2.so.14 => /lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007fb704542000) libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007fb704523000) libpsl.so.5 => /lib/x86_64-linux-gnu/libpsl.so.5 (0x00007fb704510000) libnss3.so => /lib/x86_64-linux-gnu/libnss3.so (0x00007fb7043c2000) libnssutil3.so => /lib/x86_64-linux-gnu/libnssutil3.so (0x00007fb704390000) libsmime3.so => /lib/x86_64-linux-gnu/libsmime3.so (0x00007fb704361000) libssl3.so => /lib/x86_64-linux-gnu/libssl3.so (0x00007fb704306000) libplc4.so => /lib/x86_64-linux-gnu/libplc4.so (0x00007fb7042ff000) libbrotlidec.so.1 => /lib/x86_64-linux-gnu/libbrotlidec.so.1 (0x00007fb7042f0000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fb7042eb000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fb7042e1000) /lib64/ld-linux-x86-64.so.2 (0x00007fb704a65000) libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007fb70415b000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fb703fd8000) libbrotlicommon.so.1 => /lib/x86_64-linux-gnu/libbrotlicommon.so.1 (0x00007fb703fb5000) ------------------------------------------------------------------------ [2021-07-22 23:34:27] 1001malac at gmail dot com Here you go: linux-vdso.so.1 (0x00007ffd799e2000) libargon2.so.1 => /lib/x86_64-linux-gnu/libargon2.so.1 (0x00007f678a924000) libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f678a90a000) librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f678a900000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f678a77d000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f678a778000) libxml2.so.2 => /lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f678a5cd000) libssl.so.1.1 => /lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f678a539000) libcrypto.so.1.1 => /lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f678a250000) libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f678a1cb000) libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f6789fad000) libsodium.so.23 => /lib/x86_64-linux-gnu/libsodium.so.23 (0x00007f6789f56000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6789d95000) libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6789d72000) /lib64/ld-linux-x86-64.so.2 (0x00007f678adda000) libicui18n.so.63 => /lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f6789a97000) libicuuc.so.63 => /lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f67898c8000) libicudata.so.63 => /lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f6787ed8000) liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f6787eb0000) libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f6787d2a000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f6787d10000) ------------------------------------------------------------------------ [2021-07-21 11:54:50] nikic@php.net Can you please run ldd /usr/bin/curl to confirm that you curl binary is linked against the same libcurl.so? The error message looks like your curl.so is borked. PHP doesn't particularly care whether your curl is linked against openssl, gnutls or nss. (We only specially handle using an old openssl version, but that should fail in a different way.) ------------------------------------------------------------------------ [2021-07-21 00:06:59] 1001malac at gmail dot com Description: ------------ Hello! I'm using cURL 7.64.0 with the NSS SSL backend, instead of OpenSSL. The problem I'm facing is php complains whenever it has to load the curl extension: PHP Warning: PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/lib/php/20190902/curl.so (/lib/x86_64-linux-gnu/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by /usr/lib/php/20190902/curl.so)), /usr/lib/php/20190902/curl.so.so (/usr/lib/php/20190902/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 Is there any way to use php's curl extension without openssl dependencies baked in? Maybe selecting the SSL backend somehow as detailed in the following link? https://curl.se/libcurl/c/curl_global_sslset.html Thanks! # curl --version curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 NSS/3.42.1 zlib/1.2.11 brotli/1.0.7 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.36.0 Release-Date: 2019-02-06 Protocols: file ftp ftps http https Features: AsynchDNS IDN IPv6 Largefile NTLM SSL libz brotli HTTP2 UnixSockets HTTPS-proxy PSL ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=81276&edit=1

« previous php.bugs (#235313) next »