Solved: SSL operation failed with code OpenSSL Error 14095126

Magento CMS

If you are on a Cpanel/WHM server, you might have faced an error in your Magento website or a website where Google Recaptcha is installed for logging in.

Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages:
error:14095126:SSL routines:ssl3_read_n:unexpected eof while reading in vendor/google/recaptcha/src/ReCaptcha/RequestMethod/Post.php

This was due a recent WHM/Cpanel upgrade which came with a bad patch of OpenSSL. This has nothing to do with your website. This is a server software problem. Two ways you can fix:

Option 1: Get in touch with your server customer support and they should be able to fix with a newer patch.

Option 2:

  1. If you are familiar with the Terminal, and have access to WHM, login to your WHM and access Terminal.
  2. In terminal, type this:  yum info ea-openssl11
  3. The terminal shows the version.
  4. Now, you need to downgrade. To do this, please type: yum downgrade ea-openssl11
  5. The server shows a successful message.
  6. Once OpenSSL is downgraded, you need to restart PHP-FPM service.
  7. Search for PHP-FPM on WHM search on the top left and restart the service.

Your site should now work fine again.