note 95022 modified in transports.inet by danbrown
| From: | danbrown@php.net | Date: | Wed, 09 Dec 2009 17:58:42 +0000 |
| Subject: | note 95022 modified in transports.inet by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163743@lists.php.net to get a copy of this message | ||
I've been having a problem with a TLS connection.
<?php
$fp = fsockopen("tls://mail.example.com", 587, $errno, $errstr);
?>
Which gives me an error of:
SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL
routines:SSL3_GET_RECORD:wrong version number
I believe this is caused by PHP not being able to start with an unencrypted connection and then
switch to encryption even though the functionality is built into OpenSSL.
For Google Mail users you can avoid this by using port 465 instead of 587.
--was--
I've been having a problem with a TLS connection.
$fp = fsockopen("tls://server.domain.com", 587, $errno, $errstr);
Which gives me an error of:
SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL
routines:SSL3_GET_RECORD:wrong version number
I believe this is caused by PHP not being able to start with an unencrypted connection and then
switch to encryption even though the functionality is built into OpenSSL.
For Google Mail users you can avoid this by using port 465 instead of 587.
http://php.net/manual/en/transports.inet.php