CURL Error 1: Unsupported Protocol: https

All,

I am trying to execute an HTTPS POST SOAP request using the PHP cURL shell methods, but keep getting the following cURL error: Error 1: Unsupported protocol: https. Any ideas why this is happening? The destination URL is good and I can reach it through the command line.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$this->apiURL);

curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-type: text/xml;charset=UTF-8',
    'Content-length: '.strlen($SOAPRequest),
    'SOAPAction: ""'
) ); 

curl_setopt($ch, CURLOPT_POSTFIELDS, $SOAPRequest);

curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);

$result = curl_exec($ch);
+3
source share
2 answers

First check phpinfo ();

If Curl is included in PHP, as shown in phpinfo (), then

  • MySQL, URL. , "HTTPS" , , "HTTPS" ( ) .
+5

PHP SSL.

0

Source: https://habr.com/ru/post/1785042/


All Articles