Search the web
Sign In
New User? Sign Up
net-ftp-common
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Some help please   Message List  
Reply | Forward Message #43 of 71 |
Re: [net-ftp-common] Some help please

Sandeep TR wrote:

> hello,

Hi Sandeep


> my $FTP = Net::FTP::Common->new(\%FTP_Config, \%Common_cfg);
> &Debug($FTP);
> my $Host = "192.168.1.1";
> my ($SrcFile, $CopyOp,$Error, $ConfFile);

here, you are calling Debug() before $HOST is defined. I don't see how $HOST can
get defined. If you include the complete program, that might be better.

also, does this program use strict and use warnings?

most perl programs should do that

>
> # can we login to the machine?
> print "Attempting to access host: $Host\r\n";
> if (! $FTP->login($Host)) {

*** THIS IS YOUR PROBLEM ***

You called $FTP->login($Host)

The Net::FTP::Common login() function expects a hash to be supplied or no
arguments to be supplied, not a scalar. Perhaps you meant to use Net::FTP and
not Net::FTP::Common?

if you use Net::FTP::Common, then you need to do this:

if (! $FTP->login()) {

or you can do this:

if (! $FTP->login(Host => $Host)) {


> $Error = "Error, access device at $Host check cables and make sure
> device is defaulted";
> &ReturnResults($Error);
> &Debug($Error);
> die $Error;
> }
> ....
> ...
> ....
> }
>
>
> *when i run this program i get the error as :- *
>
> Release IP Address for TestNIC
> Renew IP Address for TestNIC
> Attempting to access host: 192.168.1.1

Interesting, $HOST is defined. I don't see how it could've been defined based on
the script that I saw.

> Net::FTP>>> Net::FTP(2.72)
> Net::FTP>>> Exporter(5.562)
> Net::FTP>>> Net::Cmd(2.24)
> Net::FTP>>> IO::Socket::INET(1.25)
> Net::FTP>>> IO::Socket(1.26)
> Net::FTP>>> IO::Handle(1.21)
> Net::FTP: Unexpected EOF on command channel at zyxel.pl line 43
> FATAL: attempt to create Net::FTP session failed.
> Most likely reason for this is lack of internet connectivity.

Please install the attached version of Net::FTP::Common. It has better
debugging. I just uploaded it to CPAN.


>
>
> I am still new to this filed, i belive they are many
> people in this group with expertise in this field can some one help me
> out of this situation, its critical for me to get this thing going.
>

Don't worry. We'll help you out :)




Sun Oct 17, 2004 12:55 pm

princepawn
Offline Offline
Send Email Send Email

Attachment
Net-FTP-Common-5.2.tar.gz
Type:
application/x-gzip
Forward
Message #43 of 71 |
Expand Messages Author Sort by Date

hello, i am sandeep, a new mwmmber of this group, while running my program i came across a ftp error,when i tried to search for the same i came across this...
Sandeep TR
sandy_reply
Offline Send Email
Oct 17, 2004
7:19 am

... Hi Sandeep ... here, you are calling Debug() before $HOST is defined. I don't see how $HOST can get defined. If you include the complete program, that...
Terrence Brannon
princepawn
Offline Send Email
Oct 17, 2004
12:56 pm

... but also note: you _never_ need to call login() when using Net::FTP::Common - it automatically logs you in before performing any of its other API calls. --...
Terrence Brannon
princepawn
Offline Send Email
Oct 17, 2004
1:02 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help