From: adrian dot burla at gmail dot com
Operating system: Windows
PHP version: 7.2.6
Package: cURL related
Bug Type: Bug
Bug description:CURL cannot connect in 7.2.6, works in 7.1.x
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 bug report at https://bugs.php.net/bug.php?id=76493&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76493&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76493&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76493&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=76493&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=76493&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=76493&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=76493&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=76493&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=76493&r=support
Expected behavior: https://bugs.php.net/fix.php?id=76493&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=76493&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=76493&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=76493&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76493&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=76493&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=76493&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=76493&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=76493&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=76493&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=76493&r=mysqlcfg