nginx 错误日志中的错误:
fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol in <file> on line <no>
我可以使用 FileZilla、WinSCP 和 ftp_ssl_connect() 进行连接。但我无法使用fsockopen("ssl://domain.com", $port, $errno, $errstr, $timeout)
.
这个命令openssl s_client -connect domain.com:21 -starttls ftp
给了我正确的输出,但是如果我删除 STARTTLS 命令,它会给出这个错误:
CONNECTED(00000003)
47404513277584:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:766:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 7 bytes and written 321 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
---
谁能帮助我如何将 STARTTLS 命令放入我的 PHP 代码中?如果你们需要任何其他详细信息,请告诉我,我将编辑帖子。