My working, two year old script suddenly began to fail on the "put" command.
The error message indicated a timeout.
Message(s) from "put":
Net::FTP=GLOB(0x89eaf4)>>> ALLO 4359
Net::FTP=GLOB(0x89eaf4)<<< 202 No storage allocation necessary
Net::FTP=GLOB(0x89eaf4)>>> PORT 192,168,2,56,208,235
Net::FTP=GLOB(0x89eaf4)<<< 200 PORT command successful
Net::FTP=GLOB(0x89eaf4)>>> STOR events.php
Net::FTP=GLOB(0x89eaf4): Timeout at /Users/bin/AGftp line 288
The solution was to force passive transfer using the "passive" option, as follows:
$ftp = Net::FTP->new($system, Passive => 1, Debug => 1, Timeout => 30) if ( $FTPDEBUG);
$ftp = Net::FTP->new($system, Passive => 1, Timeout => 30) if (!$FTPDEBUG);
Note! Using FTP->pasv() did not solve this problem, for reasons beyond me.
i assume you were referring to this earlier thread [webmasterworld.com].