ftp_nlist(): data_accept: SSL/TLS handshake failed

前端 未结 2 457
梦如初夏
梦如初夏 2021-01-07 08:22

Once upon a time, there was a normalish error in PHP land:

Warning: ftp_nlist(): data_accept: SSL/TLS handshake failed in [path] on line 29

2条回答
  •  孤城傲影
    2021-01-07 08:54

    The ftp_nlist opens a data connection. That connection needs TLS/SSL handshake too.

    As the control connection handshake succeeded, the problem indeed cannot be with an absent TLS/SSL support in PHP. Neither the problem can be with anything like the server and PHP not being able to find a cipher to agree on.

    When TLS/SSL handshake on data connection fails after handshake on control connection succeeded, it's quite usually because the client (PHP) did not reuse TLS/SSL session from control connection on the data connection (see Why is session reuse useful in FTPS?). Some servers do require that. PHP supports the reuse only since 5.6.26. See PHP Bug 70195. So make sure you use that version of PHP at least.

提交回复
热议问题