From: arkadi at hosting dot lv Operating system: Linux PHP version: 5.2.10 PHP Bug Type: Streams related Bug description: Accessing ssl:// results in immediate "SSL: connection timeout" error
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 bug report at http://bugs.php.net/?id=48610&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48610&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48610&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48610&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48610&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48610&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48610&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48610&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48610&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48610&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48610&r=support Expected behavior: http://bugs.php.net/fix.php?id=48610&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48610&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48610&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48610&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48610&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48610&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48610&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48610&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48610&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48610&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48610&r=mysqlcfg