php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81276 Using curl/libcurl with NSS backend fails to load curl extension
Submitted: 2021-07-21 00:06 UTC Modified: 2021-07-23 15:30 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: 1001malac at gmail dot com Assigned:
Status: Open Package: cURL related
PHP Version: 7.4.21 OS: Debian 10.10
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: 1001malac at gmail dot com
New email:
PHP Version: OS:

 

 [2021-07-21 00:06 UTC] 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 



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-21 11:54 UTC] 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-22 23:34 UTC] 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-22 23:35 UTC] 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-23 06:05 UTC] cmb@php.net
Did you build PHP yourself, or are you using a pre-built PHP from
your distro/PPA?
 [2021-07-23 15:30 UTC] 1001malac at gmail dot com
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.
 [2022-04-22 10:51 UTC] arunsharmaji982 at gmail dot com
This is very interesting, You are a very skilled blog. I have joined your feed and stay up all night looking for your excellent article and more.
www.onlinevashikaranspecialists.com/love-marriage-specialist/
www.onlinevashikaranspecialists.com/boyfriend-vashikaran-specialist/
 [2022-04-22 10:53 UTC] arunsharmaji982 at gmail dot com
Thanks, Your Post Such a great & informative post about the Mastercard Updates its Iconic Logo and Brand Identity, Thanks for sharing www.onlinevashikaranspecialists.com
 [2023-07-31 09:28 UTC] parkassrah34 at gmail dot com
Recompile PHP cURL Extension: You can try recompiling the PHP cURL extension using the libcurl version that's linked with NSS. Ensure that PHP and libcurl are both built with the same SSL backend.

Use PHP FPM: Another option is to use PHP-FPM with a separate PHP configuration. In the PHP-FPM configuration, you can specify the correct cURL library and link it to NSS instead of OpenSSL.

(https://github.com)(https://www.livetheorangelife.net/)
 [2023-07-31 09:59 UTC] thuongchodoisl024 at gmail dot com
Thanks for sharing this information (https://github.com.php)(https://www.tellpopeyes.me/)
 [2023-08-20 12:17 UTC] gmglobalconnectwebsite at gmail dot com
I really like this, clean minimal, responsive just what i was looking for, cheers mate

(https://github.com)(https://www.gmglobalconnect.website/)
 [2023-11-29 08:46 UTC] lauryfriese932 at gmail dot com
We only specially handle using an old openssl version, but that should fail in a different way. (https://github.com)(https://candy-crush.io)
 [2024-06-26 04:51 UTC] dmmnychl123 at gmail dot com
Your generosity in sharing is greatly appreciated.(https://github.com.php)(https://tinyfishing.co)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Dec 03 17:01:29 2024 UTC