Bug #70537 [NEW]: CURLPROTO_HTTPS not handled in PHP >=5.4.33
From: megamurmulis at gmail dot com
Operating system: Windows XP
PHP version: 5.4.45
Package: cURL related
Bug Type: Bug
Bug description:CURLPROTO_HTTPS not handled in PHP >=5.4.33
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 bug report at https://bugs.php.net/bug.php?id=70537&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=70537&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=70537&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=70537&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=70537&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=70537&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=70537&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=70537&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=70537&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=70537&r=support
Expected behavior: https://bugs.php.net/fix.php?id=70537&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=70537&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=70537&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=70537&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=70537&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=70537&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=70537&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=70537&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=70537&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=70537&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=70537&r=mysqlcfg
Thread (6 messages)
- megamurmulis at gmail dot com
- megamurmulis at gmail dot comBug #70537 [Com]: CURLPROTO_HTTPS not handled in PHP >=5.4.33
- megamurmulis at gmail dot comBug #70537 [Opn]: CURLPROTO_HTTPS not handled in PHP >=5.4.33, 5.5.17, 5.6.1
- pierrick@php.netBug #70537 [Opn->Nab]: CURLPROTO_HTTPS not handled in PHP >=5.4.33, 5.5.17, 5.6.1
- megamurmulis at gmail dot comBug #70537 [Com]: CURLPROTO_HTTPS not handled in PHP >=5.4.33, 5.5.17, 5.6.1
- megamurmulis at gmail dot comBug #70537 [Com]: CURLPROTO_HTTPS not handled in PHP >=5.4.33, 5.5.17, 5.6.1