Failed to enable crypto stream_socket_client() error after upgrading PHP

I just upgraded the version of PHP on the server running this blog, and popped over to /wp-admin/site-health.php to check for any errors.

There were a few, the main one which caught my eye being The REST API encountered an error.

For the Google results, that error message in text is:

The REST API request failed due to an error.
Error: stream_socket_client(): SSL operation field with code 1. OpenSSL Error messages: error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure stream_socket_client(): Failed to enable crypto stream_socket_client(): unable to connect to ssl://words.samtarling.co.uk:443 (Unknown error) (http_request_failed)

Eeep, not good – fortunately its a simple fix, as its caused by a missing package. On Debian (or similar), run;

sudo apt-get install php{PHP VERSION}-curl
sudo service apache2 restart

Replacing {PHP VERSION} with your newly installed version (e.g. PHP7.4)

One comment

Leave a Reply