Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k & phranque

Message Too Old, No Replies

Revisit: Using Net:FTP to transfer remote to remote

Another example of ftp->put() failing. PASSIVE solution!



10:02 pm on Nov 14, 2008 (gmt 0)

5+ Year Member

A google search found my solution from an earlier thread. My intention is just to help someone else that might have the same problem.

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.


12:09 am on Nov 22, 2008 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

welcome to WebmasterWorld [webmasterworld.com], alanmalk!

i assume you were referring to this earlier thread [webmasterworld.com].


Featured Threads

Hot Threads This Week

Hot Threads This Month