Curl error: Protocol " https" not supported or disabled in libcurl
Ik stoei al een tijdje met de melding: Curl error: Protocol " https" not supported or disabled in libcurl
Mijn VPS draait op CentOS 7, met direct admin. PHP 7
Gegevens uit PHP info:
cURL support enabled
cURL Information 7.52.1
Age 3
Features
AsynchDNS No
CharConv No
Debug No
GSS-Negotiate No
IDN No
IPv6 Yes
krb4 No
Largefile Yes
libz Yes
NTLM Yes
NTLMWB Yes
SPNEGO No
SSL Yes
SSPI No
TLS-SRP No
Protocols dict, file, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, scp, sftp, smb, smbs, smtp, smtps, telnet, tftp
Host x86_64-pc-linux-gnu
SSL Version OpenSSL/1.0.1e
ZLib Version 1.2.7
libSSH Version libssh2/1.8.0
Kan iemand me op weg helpen? In het rijtje protocols staat toch echt https
Dan kan je curl compileren met --with-ssl.
Kun je me een aanzet geven hoe ik te werk moet gaan?
Wil je toch zelf aan de slag met compileren dan is dit een handige link:
how to install curl and libcurl
https://curl.haxx.se/docs/install.html
Gewijzigd op 20/02/2017 15:20:19 door Aad B
Ik wil zelf zo min mogelijk zelf maken.
Wat ik probeer is een SOAP request te doen via CURL, ik dacht dat dat niet zo moeilijk zou zijn en daar wel standaarden voor zijn. Is er eventueel een andere goede oplossing om een SOAP request/post te doen?
Extenties voor PHP dien je bij DirectAdmin uitsluitend via CustomBuild te doen. Ik zal vanavond eens wat opzoeken.
Code (php)
en meer:
http://php.net/manual/en/function.curl-version.php
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php
// Get curl version array
$version = curl_version();
// These are the bitfields that can be used
// to check for features in the curl build
$bitfields = Array(
'CURL_VERSION_IPV6',
'CURL_VERSION_KERBEROS4',
'CURL_VERSION_SSL',
'CURL_VERSION_LIBZ'
);
foreach($bitfields as $feature)
{
echo $feature . ($version['features'] & constant($feature) ? ' matches<br>' : ' does not match<br>');
echo PHP_EOL;
}
?>
// Get curl version array
$version = curl_version();
// These are the bitfields that can be used
// to check for features in the curl build
$bitfields = Array(
'CURL_VERSION_IPV6',
'CURL_VERSION_KERBEROS4',
'CURL_VERSION_SSL',
'CURL_VERSION_LIBZ'
);
foreach($bitfields as $feature)
{
echo $feature . ($version['features'] & constant($feature) ? ' matches<br>' : ' does not match<br>');
echo PHP_EOL;
}
?>
Gewijzigd op 20/02/2017 20:18:56 door Aad B
Curl is een onderdeel van de CustomBuild, dus je zult daarin in /usr/local/directadmin/custombuild/configure/ap2/configure.php56 (of een andere cijfers als extentie, ligt aan je PHP-versie) --with-ssl moeten toevoegen aan je CURL-regel. En dan PHP opnieuw proberen te builden.
Kleine aanvulling op script @AadB hierboven: waarschijnlijk moeten de constanten in het $bitfields array zonder quotes gedefinieerd worden.
Ik zag het script en was benieuwd naar mijn resultaat, het werkt bij mij goed met de quotes.
Dit was het resultaat:
CURL_VERSION_IPV6 matches
CURL_VERSION_KERBEROS4 does not match
CURL_VERSION_SSL matches
CURL_VERSION_LIBZ matches
Gewijzigd op 21/02/2017 15:53:04 door John D