ID: 48610 User updated by: arkadi at hosting dot lv Reported By: arkadi at hosting dot lv -Status: Open +Status: Bogus Bug Type: Streams related Operating System: Linux PHP Version: 5.2.10 New Comment:
It is a GCC -fpmath=sse bug (i486-linux-gnu 4.3.2 [Debian 4.3.2-1.1)] that miscompiles timeout -= (tve.tv_sec + (float) tve.tv_usec / 1000000) - (tvs.tv_sec+ (float) tvs.tv_usec / 1000000); from xp_ssl.c. Previous Comments: ------------------------------------------------------------------------ [2009-06-19 18:38:37] arkadi at hosting dot lv Description: ------------ The problem was already reported in bug #47791 but the bug was closed as Bogus. This is also probably related to bug #45016. When trying to establish SSL connection the "SSL: connection timeout" error is raised _immediately_ regardless of timeout specified. You can try to access the script running on PHP 4.4.9 http://iron.hosting.lv/ssl.php - that produces correct result - an XML fragment and PHP 5.2.10 http://iron-php5.hosting.lv/ssl.php which immediately prints (0). Stracing the process shows that connection is established and initial SSL negotiation packet is sent, but then it waits less than a second for the reply (which is not arriving in such short time), then connection is closed. I believe the problem appeared after 5.2.6, and definitely present in 5.2.9. Reproduce code: --------------- <?php $fp = fsockopen("ssl://polise.if.lv" , 443, $errno, $errstr, 30); if (!$fp) { echo "$errstr ($errno)<br />\n"; } else { $out = "GET /PartnerWS/OCTA/PArtner/PremiumCalculator.asmx?WSDL HTTP/1.1\r\n"; $out .= "Host: polise.if.lv\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); while (!feof($fp)) { echo fgets($fp, 128); } fclose($fp); } ?> Expected result: ---------------- XML fragment fetched from remote server Actual result: -------------- (0) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=48610&edit=1