From: Operating system: Ubuntu PHP version: 5.3.6 Package: OpenSSL related Bug Type: Bug Bug description:Ubuntu 11.04
Description: ------------ When opening a socket to smtp.live.com with TLS via $fp = fsockopen("tls://smtp.live.com", 587, $errno, $errstr, 3); It's neither a problem to establish a SSL connection via PHP or to connect to smtp.live.com via openssl at the command line: openssl s_client -starttls smtp -connect smtp.live.com:587 Test script: --------------- $fp = fsockopen("tls://smtp.live.com", 587, $errno, $errstr, 3); if (!$fp) { echo "$errstr ($errno)"; } Expected result: ---------------- A connection being established. Actual result: -------------- PHP Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267) in /var/www/test.php on line 4 PHP Warning: fsockopen(): Failed to enable crypto in /var/www/test.php on line 4 PHP Warning: fsockopen(): unable to connect to tls://smtp.live.com:587 (Unknown error) in /var/www/test.php on line 4 Reason 267 is according to ssl.h "SSL_R_WRONG_VERSION_NUMBER". Thus I suspect that's the same issue as in bug #29296. -- Edit bug report at https://bugs.php.net/bug.php?id=55236&edit=1 -- Try a snapshot (PHP 5.2): https://bugs.php.net/fix.php?id=55236&r=trysnapshot52 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=55236&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=55236&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=55236&r=fixed Fixed in SVN and need be documented: https://bugs.php.net/fix.php?id=55236&r=needdocs Fixed in release: https://bugs.php.net/fix.php?id=55236&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=55236&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=55236&r=needscript Try newer version: https://bugs.php.net/fix.php?id=55236&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=55236&r=support Expected behavior: https://bugs.php.net/fix.php?id=55236&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=55236&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=55236&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=55236&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=55236&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=55236&r=dst IIS Stability: https://bugs.php.net/fix.php?id=55236&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=55236&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=55236&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=55236&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=55236&r=mysqlcfg Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=55236&r=trysnapshot54