-
Notifications
You must be signed in to change notification settings - Fork 94
Open
Description
So within laravel I am trying to use this package in order to connect to remote host and send or even list files.
So in my config I have:
'ftp' => [
'driver' => 'ftp',
'host' => 'host',
'username' => 'username',
'password' => 'password',
'ssl' => false,
'passive' => 'false',
'ignorePassiveAddress' => true,
'port' => 21
],
Now I have also tried native solution like:
$host = config('filesystems.disks.ftp.host');
$user = config('filesystems.disks.ftp.username');
$password = config('filesystems.disks.ftp.password');
$ftpConn = ftp_connect($host);
$login = ftp_login($ftpConn, $user, $password);
//
//Enable PASV ( Note: must be done after ftp_login() )
//
$mode = ftp_pasv($ftpConn, TRUE);
// check connection
if ( (!$ftpConn) || (!$login) || (!$mode) ) {
echo 'FTP connection has failed! Attempted to connect to ' . $host . ' for user ' . $user . '.';
} else {
echo 'FTP connection was a success.';
$directory = ftp_nlist($ftpConn, '.');
dd('line');
echo '<pre>' . print_r($directory, true) . '</pre>';
}
ftp_close($ftpConn);
However in both cases I get same error, ftp_rawlist(): php_connect_nonb() failed: Operation now in progress (115)
pointing at line lluminate\Foundation\Bootstrap\HandleExceptions::handleError vendor/league/flysystem/src/Adapter/Ftp.php:570
I have tried it via Filezilla and it works fine, the php code runs inside ubuntu docker image. Is there anything I am missing here?
Metadata
Metadata
Assignees
Labels
No labels