No Code Attached Yet bug
avatar stell
stell
20 Apr 2023

Steps to reproduce the issue

Call this running under PHP 8.1+:

$options = array('timeout' => 30);
$host = 'ftp.immowelt.net';
$port = '21';

$ftp = FtpClient::getInstance($host, $port, $options, null, null);
if (!$ftp->isConnected()) {
    exit('fail');
}
else {
    exit('success');
}

Expected result

success

Actual result

fail

System information (as much as possible)

Joomla 4.3
PHP 8.1

Additional comments

Joomla creates a connection:

$this->_conn = @ftp_connect($host, $port, $this->_timeout);

and checks it:

if (\is_resource($this->_conn)) {
   return true;
}

Since PHP 8.1 ftp_connect returns an [FTP\Connection] instance. Previously, a [resource] was returned.
https://www.php.net/manual/en/function.ftp-connect.php

avatar stell stell - open - 20 Apr 2023
avatar joomla-cms-bot joomla-cms-bot - change - 20 Apr 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 20 Apr 2023
avatar brianteeman
brianteeman - comment - 20 Apr 2023

For what reason are you trying to use ftp?

avatar stell
stell - comment - 20 Apr 2023

In whole Europe real estate platforms like for example Immowelt and also all real estate desktop solutions like FlowFact, Propstack or OnOffice are using mainly ftp to transfer data between platforms. They not even use sFTP. So our solutions transfers data like that between Joomla driven sites and real estate portals. It's the real world and the FtpClient has an issue under 8.1+.

avatar brianteeman
brianteeman - comment - 20 Apr 2023

thank you for the explanation

avatar richard67 richard67 - change - 20 Apr 2023
Labels Added: bug
avatar richard67 richard67 - labeled - 20 Apr 2023
avatar alikon alikon - close - 28 Apr 2023
avatar alikon
alikon - comment - 28 Apr 2023

please test #40501

avatar alikon alikon - change - 28 Apr 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-04-28 15:37:34
Closed_By alikon

Add a Comment

Login with GitHub to post a comment