[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-users
Subject:    Re: Net::FTP in passive mode
From:       "Sisyphus" <sisyphus1 () optusnet ! com ! au>
Date:       2008-01-05 8:23:26
Message-ID: 23F580162B6B4362A00CDDB1B45A9B7D () desktop2
[Download RAW message or body]


----- Original Message ----- 
From: "Howard Maher" <hmaher@imacs.com>
To: <perl-win32-users@listserv.ActiveState.com>
Sent: Saturday, January 05, 2008 10:23 AM
Subject: Net::FTP in passive mode


> All of a sudden (Jan 3rd) one of my scripts running at several clients 
> that have been connecting in passive mode to our FTP server for years has 
> started having issues changing to passive mode.
>
> My code is simply:
>
> "my $port = $ftp->pasv();"
>
> $port is coming back blank.
>
> Could this have anything to do with my setting passive mode when I create 
> the connection object earlier?
>
> "$ftp = Net::FTP->new($hostname,Timeout=>20,Passive=>1)"
>
> Any ideas would be appreciated.

I think you're probably best to just experiment with some changes in the 
script that's causing the problem.
Do you need to specify 'Passive => 1' in the new() constructor ?
What happens if you leave it out, but leave the '$ftp->pasv()' call in ?
What happens if you remove the '$ftp->pasv()', but leave in the 'Passive => 
1' ?
What happens if you remove both '$ftp->pasv()' and 'Passive=> 1' ?

Do you actually need to catch the return value of '$ftp->pasv()' (in $port) 
? Most scripts that I see ignore the return value.

Apparently someone, somewhere, has changed something - but I don't know who, 
where, or what :-)

Cheers,
Rob 

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic