Title: Error: stream_socket_client(): SSL operation failed with code 1
Last modified: February 15, 2021

---

# Error: stream_socket_client(): SSL operation failed with code 1

 *  [abalegno](https://wordpress.org/support/users/abalegno/)
 * (@abalegno)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-stream_socket_client-ssl-operation-failed-with-code-1/)
 * **PHP 8**
 * The REST API is one way WordPress, and other applications, communicate with the
   server. One example is the block editor screen, which relies on this to display,
   and save, your posts and pages.
 * The REST API request failed due to an error.
    Error: stream_socket_client(): 
   SSL operation failed 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://vinodeafuera.
   uy:443 (Unknown error) (http_request_failed)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-stream_socket_client-ssl-operation-failed-with-code-1%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [scsiraidguru](https://wordpress.org/support/users/scsiraidguru/)
 * (@scsiraidguru)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-stream_socket_client-ssl-operation-failed-with-code-1/#post-14054027)
 * Your site opened fine.
 * I have seen that error before.
    In php.ini
 *     ```
       max_execution_time = 360
       ; extension=php_openssl.dll (remove the ;)
       ```
   
 * Check your OpenSSL version and PHP version. I am on OpenSSL 1.1.1i and PHP 7.4.15.
 * Here are other settings I change to improve uploads.
 *     ```
       upload_max_filesize = 768M
       post_max_size =768M
       memory_limit = 768M
       ```
   
    -  This reply was modified 5 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
    -  This reply was modified 5 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  [jeroenvip](https://wordpress.org/support/users/hieronymusdesign/)
 * (@hieronymusdesign)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-stream_socket_client-ssl-operation-failed-with-code-1/#post-14093251)
 * Hello,
 * We had the same problem today after installing WordPress on a fresh ubuntu server.
   Can you please check if you also get the message that the php-curl library needs
   to be installed.
 * After installing the php-curl library these errors where gone.
 * `apt install php-curl -y`
 *  [scsiraidguru](https://wordpress.org/support/users/scsiraidguru/)
 * (@scsiraidguru)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-stream_socket_client-ssl-operation-failed-with-code-1/#post-14093339)
 * [https://wp.scsiraidguru.com/?page_id=2927](https://wp.scsiraidguru.com/?page_id=2927)
 * I installed
    sudo apt install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-
   mysql php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-
   gd php7.4-xml php7.4-cli php7.4-zip php7.4-bcmath php7.4-imagick php7.4-fpm
 * sudo apt install php8.0 libapache2-mod-php8.0 php8.0-common php8.0-mysql php8.0-
   gmp php8.0-curl php8.0-intl php8.0-mbstring php8.0-xmlrpc php8.0-gd php8.0-xml
   php8.0-cli php8.0-zip php8.0-bcmath php8.0-imagick php8.0-fpm
 * I didn’t have that curl file but the error still happens.
 * My error came on WP SMTP Mail. The error came up trying to configure SMTP for
   WordPress. I was considering creating a new server in 20.04.2. The three web 
   sites move easily.
 *  [scsiraidguru](https://wordpress.org/support/users/scsiraidguru/)
 * (@scsiraidguru)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-stream_socket_client-ssl-operation-failed-with-code-1/#post-14095066)
 * Here is the command without the path
 *  openssl s_client -connect smtp-mail.outlook.com:587 -starttls smtp
    CONNECTED(
   00000003) depth=1 C = US, O = DigiCert Inc, CN = DigiCert Cloud Services CA-1
   verify error:num=20:unable to get local issuer certificate verify return:1 depth
   =0 C = US, ST = Washington, L = Redmond, O = Microsoft Corporation, CN = outlook.
   com verify return:1 — Certificate chain 0 s:C = US, ST = Washington, L = Redmond,
   O = Microsoft Corporation, CN = outlook.com i:C = US, O = DigiCert Inc, CN = 
   DigiCert Cloud Services CA-1 1 s:C = US, O = DigiCert Inc, CN = DigiCert Cloud
   Services CA-1 i:C = US, O = DigiCert Inc, OU = [http://www.digicert.com](http://www.digicert.com),
   CN = DigiCert Global Root CA
 * With path I get this.
 *     ```
       openssl s_client -CApath /etc/ssl/certs/ -connect smtp-mail.outlook.com:587 -starttls smtp
       CONNECTED(00000003)
       depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
       verify return:1
       depth=1 C = US, O = DigiCert Inc, CN = DigiCert Cloud Services CA-1
       verify return:1
       depth=0 C = US, ST = Washington, L = Redmond, O = Microsoft Corporation, CN = outlook.com
       verify return:1
       ---
       Certificate chain
        0 s:C = US, ST = Washington, L = Redmond, O = Microsoft Corporation, CN = outlook.com
          i:C = US, O = DigiCert Inc, CN = DigiCert Cloud Services CA-1
        1 s:C = US, O = DigiCert Inc, CN = DigiCert Cloud Services CA-1
          i:C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Error: stream_socket_client(): SSL operation failed with code 1’ is closed
to new replies.

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [rest](https://wordpress.org/support/topic-tag/rest/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)
 * [SSLv3](https://wordpress.org/support/topic-tag/sslv3/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [scsiraidguru](https://wordpress.org/support/users/scsiraidguru/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/error-stream_socket_client-ssl-operation-failed-with-code-1/#post-14095066)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
