harishanchu / Laravel-FTP

A simple Laravel 4/5/6/7 ftp service provider with basic ftp methods.
220 stars 87 forks source link

Code kept timing out at the ftp_nlist() command #10

Closed anilskalyane closed 10 years ago

anilskalyane commented 10 years ago

Creating a script to connect to an FTP server. That should be simple and trivial, right? The important code that they were using looked like:

$server_file = Ftp::connection()->getDirListing('product/catalog');

Unfortunately the code kept timing out at the ftp_nlist() command. After a few minutes the script would timeout and return a warning:

Warning: ftp_nlist() [function.ftp-nlist]: php_connect_nonb() failed: Operation now in progress (115)

harishanchu commented 10 years ago

It seems like something is wrong with your FTP configuration. May be this could help you: http://www.elitehosts.com/blog/php-ftp-passive-ftp-server-behind-nat-nightmare/