Bug #70537 [Com]: CURLPROTO_HTTPS not handled in PHP >=5.4.33

From: Date: Mon, 21 Sep 2015 15:41:21 +0000
Subject: Bug #70537 [Com]: CURLPROTO_HTTPS not handled in PHP >=5.4.33
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196135@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70537&edit=1

 ID:                 70537
 Comment by:         megamurmulis at gmail dot com
 Reported by:        megamurmulis at gmail dot com
 Summary:            CURLPROTO_HTTPS not handled in PHP >=5.4.33
 Status:             Open
 Type:               Bug
 Package:            cURL related
 Operating System:   Windows XP
 PHP Version:        5.4.45
 Block user comment: N
 Private report:     N

 New Comment:

Also confirmed to have same issue:

php-5.5.16-Win32-VC11-x86.zip   = working (and older)
php-5.5.17-Win32-VC11-x86.zip   = failed  (and newer, including 5.5.29)

php-5.6.0-Win32-VC11-x86.zip    = working (and older)
php-5.6.1-Win32-VC11-x86.zip    = failed  (and newer, including 5.6.13)

So seems all later branches also affected..


Previous Comments:
------------------------------------------------------------------------
[2015-09-20 18:07:34] megamurmulis at gmail dot com

Description:
------------
#PROBLEM:
In PHP >=5.4.33 (including 5.4.45), when using "CURLOPT_PROTOCOLS" with
"CURLPROTO_HTTPS" (any combination other than CURLPROTO_ALL) - request on "https://" urls fail with error: "Protocol "https" not
supported or disabled in libcurl".


#PHP ( http://windows.php.net/downloads/releases/archives/
)
php-5.4.32-Win32-VC9-x86.zip (and older = working ok)
php-5.4.33-Win32-VC9-x86.zip (and newer = fails)

#SETUP:
Extract PHP zip; use php.ini-development (set "extension_dir"; enable extensions:
php_curl.dll, php_openssl.dll)

#TEST:
Run cmd from php folder:  php.exe -f test_SSL2.php


#NOTE:
If "/ext/php_curl.dll" is overwritten with an older version (i.e. v5.4.32) =
CURLPROTO_HTTPS is correctly handled and request suceeds in newer PHP versions too - so issue seems
to be in library "php_curl.dll"..

Test script:
---------------
<?php
@error_reporting(E_ALL);
@ini_set('display_errors', true);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,              'https://www.google.com/');
curl_setopt($ch, CURLOPT_TIMEOUT,          15);
curl_setopt($ch, CURLOPT_HEADER,           false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,   true);
curl_setopt($ch, CURLOPT_FRESH_CONNECT,    true);
curl_setopt($ch, CURLOPT_FORBID_REUSE,     true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION,   true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER,   false);
curl_setopt($ch, CURLOPT_PROTOCOLS,        CURLPROTO_HTTP or CURLPROTO_HTTPS);
$data = curl_exec($ch);
if ($data === false)
	die('cURL error: '. curl_error($ch));
curl_close($ch);
echo 'DATA: '. strlen($data) .'B';


Expected result:
----------------
Request is supposed to succeed due https protocol being allowed (via CURLPROTO_HTTPS)..

Actual result:
--------------
Request fails, curl_error() shows error:
"Protocol "https" not supported or disabled in libcurl"


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70537&edit=1


Thread (6 messages)

« previous php.bugs (#196135) next »