Bug #76493 [Opn->Csd]: CURL cannot connect in 7.2.6, works in 7.1.x
Edit report at https://bugs.php.net/bug.php?id=76493&edit=1
ID: 76493
Updated by: mike@php.net
Reported by: adrian dot burla at gmail dot com
Summary: CURL cannot connect in 7.2.6, works in 7.1.x
-Status: Open
+Status: Closed
Type: Bug
Package: cURL related
Operating System: Windows
PHP Version: 7.2.6
-Assigned To:
+Assigned To: mike
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2018-12-01 20:11:57] adrian dot burla at gmail dot com
The problem persisted up to 7.2.10, it no longer exists with 7.2.12. Not tested in 7.2.11.
------------------------------------------------------------------------
[2018-06-18 14:31:59] adrian dot burla at gmail dot com
Description:
------------
Running the same script against the same server, CURL cannot connect to the server in 7.2.6 with
curl error 35; it works in 7.0.x and 7.1.x. Trying to debug I disabled verifypeer and manually set
SSL version to 4, still it does not work. I tested in a command prompt with curl ver 7.60 and it
works flawlessly with the default options (I provided only the URL, no other parameters).
Debug in 7.2.6
* Trying 192.44.xxx.xxx...
* TCP_NODELAY set
* Connected to xxxxxxx.xxxx.com (192.44.xxx.xxx) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
CAfile: C:\PHP\Certificates\cacert.pem
CApath: C:\PHP\Certificates
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to wirekey.pg.com:443
* stopped the pause stream!
* Closing connection 0
Debug in 7.1.18
* Trying 192.44.xxx.xxx...
* TCP_NODELAY set
* Connected to xxxxxxx.xxxxx.com (192.44.xxx.xxx) port 443 (#0)
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
CAfile: C:\PHP\Certificates\cacert.pem
CApath: C:\PHP\Certificates
* SSL connection using TLSv1.0 / DES-CBC3-SHA
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: C=US; ST=Ohio; xxxxxxxxx; CN=xxxxxxx.xxxxx.com
* start date: Oct 4 14:21:40 2017 GMT
* expire date: Oct 4 14:51:39 2018 GMT
* issuer: C=US; O=Entrust, Inc.; OU=See www.entrust.net/legal-terms; OU=(c) 2012 Entrust, Inc. -
for authorized use only; CN=Entrust Certification Authority - L1K
* SSL certificate verify ok.
> GET yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy HTTP/1.1
Host: xxxxxxx.xxxxx.com
Accept: */*
< HTTP/1.1 200 OK
< Date: Mon, 18 Jun 2018 14:14:59 GMT
< Server: Microsoft-IIS/6.0
< Content-Type: text/xml; charset=ISO-8859-1
* no chunk, no close, no size. Assume close to signal end
<
* Closing connection 0
Test script:
---------------
$curl = curl_init();
curl_setopt($curl, CURLOPT_VERBOSE,1);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); //has no impact on the result
//curl_setopt($curl, CURLOPT_CAPATH, 'C:\PHP\Certificates');
//curl_setopt($curl, CURLOPT_CAINFO, 'C:\PHP\Certificates\cacert.pem');
curl_setopt($curl, CURLOPT_SSLVERSION,4); //fix for PHP 7 and xxxxxxx.xxxxx.com
curl_setopt($curl, CURLOPT_TIMEOUT, 150);
$response = curl_exec($curl);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76493&edit=1
Thread (4 messages)