<bdo id='3BRmG'></bdo><ul id='3BRmG'></ul>
<legend id='3BRmG'><style id='3BRmG'><dir id='3BRmG'><q id='3BRmG'></q></dir></style></legend>

    1. <tfoot id='3BRmG'></tfoot>

    2. <i id='3BRmG'><tr id='3BRmG'><dt id='3BRmG'><q id='3BRmG'><span id='3BRmG'><b id='3BRmG'><form id='3BRmG'><ins id='3BRmG'></ins><ul id='3BRmG'></ul><sub id='3BRmG'></sub></form><legend id='3BRmG'></legend><bdo id='3BRmG'><pre id='3BRmG'><center id='3BRmG'></center></pre></bdo></b><th id='3BRmG'></th></span></q></dt></tr></i><div id='3BRmG'><tfoot id='3BRmG'></tfoot><dl id='3BRmG'><fieldset id='3BRmG'></fieldset></dl></div>

      <small id='3BRmG'></small><noframes id='3BRmG'>

      ftp_nlist(): data_accept: SSL/TLS 握手失败

      ftp_nlist(): data_accept: SSL/TLS handshake failed(ftp_nlist(): data_accept: SSL/TLS 握手失败)

      • <legend id='lJPZZ'><style id='lJPZZ'><dir id='lJPZZ'><q id='lJPZZ'></q></dir></style></legend>
        <tfoot id='lJPZZ'></tfoot>

          <small id='lJPZZ'></small><noframes id='lJPZZ'>

            <tbody id='lJPZZ'></tbody>
          • <i id='lJPZZ'><tr id='lJPZZ'><dt id='lJPZZ'><q id='lJPZZ'><span id='lJPZZ'><b id='lJPZZ'><form id='lJPZZ'><ins id='lJPZZ'></ins><ul id='lJPZZ'></ul><sub id='lJPZZ'></sub></form><legend id='lJPZZ'></legend><bdo id='lJPZZ'><pre id='lJPZZ'><center id='lJPZZ'></center></pre></bdo></b><th id='lJPZZ'></th></span></q></dt></tr></i><div id='lJPZZ'><tfoot id='lJPZZ'></tfoot><dl id='lJPZZ'><fieldset id='lJPZZ'></fieldset></dl></div>

                <bdo id='lJPZZ'></bdo><ul id='lJPZZ'></ul>
                本文介绍了ftp_nlist(): data_accept: SSL/TLS 握手失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                曾几何时,PHP 领域有一个正常的错误:

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

                警告:ftp_nlist(): data_accept: SSL/TLS 握手在第 29 行的 [path] 中失败

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

                但这里有一个问题,第 29 行".不是连接或登录,注意它是如何引用 ftp_nlist() 函数的:

                But here's the catch, "line 29" is not the connection or login, note how it referenced the ftp_nlist() function:

                $ftp = ftp_ssl_connect($cred['host'], $cred['port'], 180);
                if (!ftp_login($ftp, $cred['user'], $cred['pass'])) {die("Login Failed");}
                ftp_pasv($ftp, true);
                
                $files = ftp_nlist($ftp, '');
                

                OpenSSL 在 phpinfo() 中编译并启用,如下所示:ftp_login() : SSL/TLS 握手失败

                OpenSSL is compiled and enabled in phpinfo() as suggested here: ftp_login() : SSL/TLS handshake failed

                我看到的其他帖子似乎都引用了适合我的 ftp_ssl_connect()ftp_login() 命令中的错误.当 ftp_login() 返回 true 时我可以检查什么?

                Other posts I've seen all seem to reference error in the ftp_ssl_connect() or ftp_login() commands which work for me. What can I check when ftp_login() returns true?

                或者...是否有任何日志可以获取有关问题的更多详细信息?

                Or... are there any logs to get more details on what is wrong?

                我使用的是 php 5.3.29.该代码在我的桌面(php 7)上可以正常工作,但我希望我不必将服务器升级到 7 即可工作

                I'm using php 5.3.29. The code does work properly on my desktop (php 7), but I'm hoping I don't have to upgrade the server to 7 for this to work

                2017 年 12 月 28 日更新:升级到 5.6 解决了,所以看起来 Martin 是正确的.

                12-28-2017 update: Upgrading to 5.6 resolved, so looks like Martin is on point.

                推荐答案

                ftp_nlist 打开一个数据连接.该连接也需要 TLS/SSL 握手.

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

                由于控制连接握手成功,问题确实不在于 PHP 中缺少 TLS/SSL 支持.问题不在于服务器和 PHP 无法找到一致的密码.

                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.

                当控制连接握手成功后数据连接上的 TLS/SSL 握手失败时,通常是因为客户端 (PHP) 没有从数据连接上的控制连接重用 TLS/SSL 会话(请参阅 为什么会话重用在 FTPS 中有用?).有些服务器确实需要.PHP 仅从 5.6.26 开始支持重用.请参阅 PHP 错误 70195.因此,请确保您至少使用该版本的 PHP.

                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.

                这篇关于ftp_nlist(): data_accept: SSL/TLS 握手失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    • <legend id='5oWey'><style id='5oWey'><dir id='5oWey'><q id='5oWey'></q></dir></style></legend>
                        <bdo id='5oWey'></bdo><ul id='5oWey'></ul>
                            <tbody id='5oWey'></tbody>

                        • <i id='5oWey'><tr id='5oWey'><dt id='5oWey'><q id='5oWey'><span id='5oWey'><b id='5oWey'><form id='5oWey'><ins id='5oWey'></ins><ul id='5oWey'></ul><sub id='5oWey'></sub></form><legend id='5oWey'></legend><bdo id='5oWey'><pre id='5oWey'><center id='5oWey'></center></pre></bdo></b><th id='5oWey'></th></span></q></dt></tr></i><div id='5oWey'><tfoot id='5oWey'></tfoot><dl id='5oWey'><fieldset id='5oWey'></fieldset></dl></div>

                        • <small id='5oWey'></small><noframes id='5oWey'>

                          <tfoot id='5oWey'></tfoot>