in reply to CGI/FTP Put question
Can't call method "sockport" on an undefined value
That's probably because the preceding bind/listen call failed, which in turn might be because your webserver process is not allowed to create the respective listening socket to which the FTP server (when operating in the default "active" mode) is then meant to establish a second connection to (used to transfer the data).
In other words, you could try passive mode (which is not guaranteed to work either, though). I.e.
$ftp = Net::FTP->new("ftp.xyz.com", Passive => 1, Timeout => 300, Debu +g => 1)
Quote from the docs:
FTP servers can work in passive or active mode. Active mode is when you want to transfer data you have to tell the server the address and port to connect to. Passive mode is when the server provides the address and port and you establish the connection. With some firewalls active mode does not work as the server cannot connect to your machine (because you are behind a firewall) and the fi +rewall does not re-write the command. In this case you should set ftp_ext_pas +sive to a true value.
|
|---|