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

From: Date: Sun, 24 Apr 2016 01:28:45 +0000
Subject: Bug #70537 [Com]: CURLPROTO_HTTPS not handled in PHP >=5.4.33, 5.5.17, 5.6.1
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200727@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, 5.5.17, 5.6.1 Status: Not a bug Type: Bug Package: cURL related Operating System: Any PHP Version: 5.4.33, 5.5.17, 5.6.1 Block user comment: N Private report: N New Comment: Thanks for response. I'm not asking for help - as noted: 1. Problem is in the extension php_curl.dll; 2. Problem only started after certain commit - affecting all 5.x versions after certain date (you can check date=version).. 3. Problem by it self is that in those later versions - constant CURLPROTO_HTTPS isn't handled properly. The rest of info is just to confirm that this problem started after certain commint/version and not in php core, but extension... Previous Comments: ------------------------------------------------------------------------ [2016-04-24 01:02:41] pierrick@php.net Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Due to the volume of reports we can not explain in detail here why your report is not a bug. The support channels will be able to provide an explanation for you. Thank you for your interest in PHP. In your sample you're using curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP or CURLPROTO_HTTPS); instead of curl_setopt($ch, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); ------------------------------------------------------------------------ [2015-09-21 15:51:22] megamurmulis at gmail dot com #Checked and updated other versions: php-5.3.29-Win32-VC9-x86 = all working php-5.4.32-Win32-VC9-x86.zip = working (and older) php-5.4.33-Win32-VC9-x86.zip = failed (and newer, including 5.4.45) 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) ------------------------------------------------------------------------ [2015-09-21 15:41:19] megamurmulis at gmail dot com 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.. ------------------------------------------------------------------------ [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

« previous php.bugs (#200727) next »