Question on Net::FTP.
From: Silky Manwani (silkym_at_mac.com)
Date: 05/28/04
- Next message: Silky Manwani: "Re: Question on Net::FTP."
- Previous message: Tim Johnson: "RE: appending to a file"
- Next in thread: Silky Manwani: "Re: Question on Net::FTP."
- Reply: Silky Manwani: "Re: Question on Net::FTP."
- Maybe reply: Silky Manwani: "Re: Question on Net::FTP."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: beginners@perl.org Date: Thu, 27 May 2004 16:40:22 -0700
Hello,
I have this program where I am trying to ftp a file from one machine to
another.
so code somewhat looks like this:
$ftp = Net::FTP->new(host, (Debug => 1, Timeout =>600, Passive =>1));
$ftp->login($user,$pass);
$ftp->binary();
$ftp->put($file);
At some point this code was working and now it hangs at
$ok = CMD_INFO == $ftp->response(); in FTP.pm
The file gets created on the remote machine but it's of zero length..So
the contents don't get copied.
The output looks like this:
Net::FTP=GLOB(0x101792d4)>>> user abc
Net::FTP=GLOB(0x101792d4)<<< 331 Password required for
abc.
Net::FTP=GLOB(0x101792d4)>>> PASS ....
Net::FTP=GLOB(0x101792d4)<<< 230-
Net::FTP=GLOB(0x101792d4)<<< Welcome to Darwin!
Net::FTP=GLOB(0x101792d4)<<< 230 User abc logged in.
Net::FTP=GLOB(0x101792d4)>>> CWD
/abd/folder
Net::FTP=GLOB(0x101792d4)<<< 250 CWD command
successful.
Net::FTP=GLOB(0x101792d4)>>> TYPE I
Net::FTP=GLOB(0x101792d4)<<< 200 Type set to I.
Net::FTP=GLOB(0x101792d4)>>> ALLO 382
Net::FTP=GLOB(0x101792d4)<<< 202 ALLO command ignored.
Net::FTP=GLOB(0x101792d4)>>> PASV
Net::FTP=GLOB(0x101792d4)<<< 227 Entering Passive Mode
(17,213,12,192,192,245)
Net::FTP=GLOB(0x101792d4)>>> STOR TingTong
So, it just hangs at the last STOR. (Which tries to copy the file and
is waiting for some response!!)
Any ideas..!?
Thanks.
- Next message: Silky Manwani: "Re: Question on Net::FTP."
- Previous message: Tim Johnson: "RE: appending to a file"
- Next in thread: Silky Manwani: "Re: Question on Net::FTP."
- Reply: Silky Manwani: "Re: Question on Net::FTP."
- Maybe reply: Silky Manwani: "Re: Question on Net::FTP."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|