I'm trying a simple example
$sftp = new phpseclib\Net\SFTP(FTP_ADDRESS);
if (!$sftp->login(FTP_USER, FTP_PASS)) {
$logger->error("FTP credentials error");
$logger->error($sftp->getLastSFTPError());
} else {
$logger->log("Connection successful");
}
print_r($sftp->rawlist());
However the script just hangs and finally times out
( ! ) Fatal error: Maximum execution time of 30 seconds exceeded in C:\xampp\htdocs\XookCatalogFeed\lib\phpseclib\Net\SSH2.php on line 3186
Call Stack
# Time Memory Function Location
1 0.2015 152184 {main}( ) ..\index.php:0
2 0.2244 2275600 handle ( ) ..\index.php:95
3 0.2246 2276880 {closure:C:\xampp\htdocs\XookCatalogFeed\handlers\import.php:157-285}( ) ..\index.php:95
4 0.2254 2303944 phpseclib\Net\SFTP->login( ) ..\import.php:170
5 5.1277 4457272 phpseclib\Net\SFTP->_send_sftp_packet( ) ..\SFTP.php:444
6 5.1278 4457592 phpseclib\Net\SSH2->_send_channel_packet( ) ..\SFTP.php:2635
7 30.0009 4457760 phpseclib\Net\SSH2->_send_binary_packet( ) ..\SSH2.php:3332
I have tried a lot of stuff but nothing seems to work. I have done some debugging (step by step) it looks like the servers accepts thje credential but then the client just loops sending empty data at _send_binary_packet.
Here is the log: https://gist.github.com/vlopez/2a48d261ab7713dbc06d
Someone, please help.