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');
}
success
fail
Joomla 4.3
PHP 8.1
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
Labels |
Added:
No Code Attached Yet
|
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+.
thank you for the explanation
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-04-28 15:37:34 |
Closed_By | ⇒ | alikon |
For what reason are you trying to use ftp?