homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
Forum Library, Charter, Moderators: coopster & jatar k & phranque

Perl Server Side CGI Scripting Forum

Revisit: Using Net:FTP to transfer remote to remote
Another example of ftp->put() failing. PASSIVE solution!

5+ Year Member

Msg#: 3786569 posted 10:02 pm on Nov 14, 2008 (gmt 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.



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

Msg#: 3786569 posted 12:09 am on Nov 22, 2008 (gmt 0)

welcome to WebmasterWorld [webmasterworld.com], alanmalk!

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

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Perl Server Side CGI Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved