DrWho_100 has asked for the wisdom of the Perl Monks concerning the following question:
Here's the output from my error log:use Net::FTP; $ftp = Net::FTP->new("ftp.xyz.com", Timeout => 300, Debug => 1) or + die "Cannot contact $host: $!"; $ftp->login("xxxx",'yyyy'); $ftp->cwd("/"); $ftp->put("/directory-a/filename-b"); $ftp->quit;
I've tried various ways of specifying the path including the absolute path on my server to the file without success. However, just now I've figured out that using the absolute path gets past the "Cannot open Local file directory-a/filename-b" message but generates a different error: Can't call method "sockport" on an undefined value at /usr/local/lib/perl5/5.8.8/Net/FTP.pm line 837. Does this indicate a problem with the server configuration? Any suggestions are appreciated.Net::FTP>>> Net::FTP(2.75) Net::FTP>>> Exporter(5.58) Net::FTP>>> Net::Cmd(2.26) Net::FTP>>> IO::Socket::INET(1.31) Net::FTP>>> IO::Socket(1.29) Net::FTP>>> IO::Handle(1.25) Net::FTP=GLOB(0x82f8768)<<< 220---------- Welcome to Pure-FTPd ------- +--- Net::FTP=GLOB(0x82f8768)<<< 220-You are user number 318 of 1000 allowe +d. Net::FTP=GLOB(0x82f8768)<<< 220-Local time is now 10:41. Server port: +21. Net::FTP=GLOB(0x82f8768)<<< 220-This is a private system - No anonymou +s login Net::FTP=GLOB(0x82f8768)<<< 220 You will be disconnected after 60 seco +nds of inactivity. Net::FTP=GLOB(0x82f8768)>>> user xxxx Net::FTP=GLOB(0x82f8768)<<< 331 User xxxx OK. Password required Net::FTP=GLOB(0x82f8768)>>> PASS .... Net::FTP=GLOB(0x82f8768)<<< 230-User xxxx has group access to: 1000 + Net::FTP=GLOB(0x82f8768)<<< 230 OK. Current restricted directory is / Net::FTP=GLOB(0x82f8768)>>> CWD / Net::FTP=GLOB(0x82f8768)<<< 250 OK. Current directory is / Cannot open Local file directory-a/filename-b: No such file or directo +ry at /home/users/web/blah/cgi-bin/script.cgi line 10 Net::FTP=GLOB(0x82f8768)>>> QUIT Net::FTP=GLOB(0x82f8768)<<< 221-Goodbye. You uploaded 0 and downloaded + 0 kbytes. Net::FTP=GLOB(0x82f8768)<<< 221 Logout.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI/FTP Put question
by almut (Canon) on Jul 17, 2008 at 18:38 UTC | |
|
Re: CGI/FTP Put question
by pileofrogs (Priest) on Jul 17, 2008 at 18:46 UTC | |
|
Re: CGI/FTP Put question
by DrWho_100 (Acolyte) on Jul 17, 2008 at 20:12 UTC | |
|
Re: CGI/FTP Put question
by eosbuddy (Scribe) on Jul 17, 2008 at 19:01 UTC | |
|
Re: CGI/FTP Put question
by jethro (Monsignor) on Jul 17, 2008 at 18:56 UTC |