I'm trying to use the Laravel FTP Flysystem Adapter. Following the instructions on https://laravel.com/docs/5.2/filesystem I have added the following to my filesystems.php
config file
'disks' => [
'ftp' => [
'driver' => 'ftp',
'host' => 'ip_address',
'username' => 'username',
'password' => 'password',
'root' => '/home/username',
'ssl' => true,
],
],
When I'm running any command on the FTP disk like Storage::disk('ftp')->allDirectories('/home/username')
I get the following error
PHP Fatal error: Uncaught exception 'ErrorException' with message 'fclose(): supplied resource is not a valid stream resource' in ../vendor/league/flysystem/src/Adapter/Ftp.php:455
I've tested the FTP server on an FTP client and all works fine.