3

Specifically we fail with this message:

[30-Apr-2017 14:05:18 UTC] PHP Warning:  stream_socket_enable_crypto(): SSL operation failed with code 1. OpenSSL Error messages:
error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure in /home/xxxxxxxx/public_html/phpmailer/PHPMailer-5.2.8/class.smtp.php on line 272

Googling this we find reports of similar errors during upgrades from PHP 5.5 - but these all stem from improved certificate verification introduced in PHP 5.6. This doesnt seem to be our issue. For instance - following the PHPMailer troubleshooting wiki - we are able to connect to the smtp server with openSSL.

openssl s_client -starttls smtp -crlf -connect vps.ourserver.com:587
.
.
SSL handshake has read 5284 bytes and written 468 bytes
.
.
Verify return code: 0 (ok)

Turning SMTBDebug on (level 4) doesn't really show anything useful:

2017-04-30 16:04:54     CLIENT -> SERVER: STARTTLS
2017-04-30 16:04:54     SMTP -> get_lines(): $data is ""
2017-04-30 16:04:54     SMTP -> get_lines(): $str is  "220 TLS go ahead
                                          "
2017-04-30 16:04:54     SERVER -> CLIENT: 220 TLS go ahead
2017-04-30 16:04:54     SMTP Error: Could not connect to SMTP host.
2017-04-30 16:04:54     CLIENT -> SERVER: QUIT

As stated - this problem started immediately after the PHP upgrade. No changes to code or SSL/Certificate configurations.

Suggestions on next steps to troubleshoot?

Edit: It was suggested that this question may have been solved previously SSL3_GET_SERVER_CERTIFICATE.. but it is a different error message (and I did try overriding the smtpoptions as suggested - to no effect).

Community
  • 1
  • 1
user3144056
  • 41
  • 2
  • 6
  • Possible duplicate of [PHPMailer - SSL3\_GET\_SERVER\_CERTIFICATE:certificate verify failed](http://stackoverflow.com/questions/26827192/phpmailer-ssl3-get-server-certificatecertificate-verify-failed) – René Höhle Apr 30 '17 at 16:52
  • You ignored the *very first thing* the troubleshooting guide says - you're running a very old, buggy and vulnerable version, so you should update it to the latest before doing anything else. – Synchro Apr 30 '17 at 17:27

1 Answers1

0

Solved. Upgraded to PHPMailer 5.2.23 and the error message disappeared. Thanks to Synchro (despite the snarky tone...lol).

user3144056
  • 41
  • 2
  • 6