Bug #68329 [Com]: HTTPS-requests to some servers are blocking until a connection timeout occurs.

From: Date: Mon, 02 Feb 2015 16:13:00 +0000
Subject: Bug #68329 [Com]: HTTPS-requests to some servers are blocking until a connection timeout occurs.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-190412@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=68329&edit=1 ID: 68329 Comment by: RichParker at nexgenpharma dot com Reported by: p dot schillinger at ec-elements dot com Summary: HTTPS-requests to some servers are blocking until a connection timeout occurs. Status: Verified Type: Bug Package: OpenSSL related Operating System: any PHP Version: 5.6.2 Assigned To: rdlowrey Block user comment: N Private report: N New Comment: We ran into this also. But we were working just fine for about a month (Few days short of 30 days). We average about 100K hits per day and resulting in 200-300 transactions per day. Without warning, the usage of file_get_contents just died. Our work around was to go to curl, thanks for that part. We had to revert back to 5.4 (from 5.6.4) which the version we have is not PCI compliant, so I am anxious for a fix for this. We use PHP on our Windows servers. Thank you. Previous Comments: ------------------------------------------------------------------------ [2014-11-05 14:31:30] rdlowrey@php.net I haven't had a chance to look at this yet -- have been *really* busy. It may be related to the problems surrounding the attempted fix for https://bugs.php.net/bug.php?id=41631 that has been haunting me, although those changes were supposed to be held out from the 5.6 branch. Anyway, will try to find time ASAP to work it out. Thanks for the report. ------------------------------------------------------------------------ [2014-10-30 17:43:51] aharvey@php.net I can reproduce this as well. Daniel, this feels like something you probably know about. Can you have a look, please? ------------------------------------------------------------------------ [2014-10-30 14:40:40] p dot schillinger at ec-elements dot com Description: ------------ Downloading any content over HTTPS with the build-in stream-mechanism does not work as expected with some servers (e.g. Apache 2.4 mod_itk mod_ssl). The process always blocks until the connection timeout occurs. The return value is correct, however, it takes a long time. Fetching the same URL with Curl or by bare HTTP works fine. It affects all versions of PHP. Test script: --------------- <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://www.ec-elements.com/sitemap.xml'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $t1 = microtime(true); $output1 = curl_exec($ch); $t2 = microtime(true); echo "curl_exec: ".($t2-$t1)." s\n"; $t1 = microtime(true); $output2 = file_get_contents('https://www.ec-elements.com/sitemap.xml'); $t2 = microtime(true); echo "file_get_contents: ".($t2-$t1)." s\n"; Actual result: -------------- curl_exec: 0.11854910850525 s file_get_contents: 60.250888824463 s ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=68329&edit=1

« previous php.bugs (#190412) next »