错误的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>
无法连接到使用fsockopen
我能够使用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代码?请让我知道,如果你们需要任何其他细节,我将编辑帖子。