Welcome to WebmasterWorld Guest from 54.145.23.244

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)

New User

5+ Year Member

joined:Nov 14, 2008
posts:1
votes: 0


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)

Administrator

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

joined:Aug 10, 2004
posts:10550
votes: 10


welcome to WebmasterWorld [webmasterworld.com], alanmalk!

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

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members