小编Dan*_*yra的帖子

“php_connect_nonb() failed: Operation now in progress (115)”,在 PHP 中使用 TLS/SSL 加密的 FTP 连接 - 未加密的连接有效

我正在尝试为我的服务器的 cPanel 帐户使用自动备份脚本。
我已经在一台带有 FileZilla 服务器的本地机器上安装了一个 FTP 服务器。我可以使用 FileZilla 客户端、Plesk 服务器和 lftp 成功连接和传输文件...
服务器只接受加密连接并启用被动模式。

由于某些未知原因,当尝试使用 PHP 连接和放置文件时,响应是:

警告:ftp_put(): php_connect_nonb() failed: Operation now in progress (115) in
/home/xxxxxxx/public_html/lab/test/perform_mysql_bk.php on line 326

对这个错误有什么想法吗?

对于我正在使用的连接:

$fSuccess = false;

$sServerAddress = $this->m_aConfig['FTP_SERVER_ADDRESS'];
$iServerPort = (int)( $this->m_aConfig['FTP_SERVER_PORT'] );

// set up FTP connection
if ( ($this->m_aConfig['FTP_USE_SSL'] == 'YES') ) {

    if ( function_exists('ftp_ssl_connect') ) {
        $this->m_oFtpConnection = ftp_ssl_connect( $sServerAddress, $iServerPort );

        if ( !$this->m_oFtpConnection ) {
            $this->writeLog( "Attempt to connect to ".$sServerAddress.":".$iServerPort." with SSL+FTP failed. …
Run Code Online (Sandbox Code Playgroud)

php ftp passive-mode

3
推荐指数
1
解决办法
1万
查看次数

标签 统计

ftp ×1

passive-mode ×1

php ×1