boboson has asked for the wisdom of the Perl Monks concerning the following question:

I am using Net::FTP in a webproject but I can only get it to connect occasionally. Therefore, I need to be able to see the debug information, but I don't know how?
Can anyone enlighten me?
I am using CGI::Application with HTML::Template for outputting.
  • Comment on Where can I see the Debug info from Net::FTP

Replies are listed 'Best First'.
Re: Where can I see the Debug info from Net::FTP
by davidrw (Prior) on Apr 03, 2006 at 20:48 UTC
    Do you have the debug attribute of Net::FTP on?
    my $ftp = Net::FTP->new("some.host.name", Debug => 1);
    Or are you asking where does the STDERR stuff go? If the latter, you'll need to find your web server's error_log, which will depend entirely on your (or your ISP's) setup.
Re: Where can I see the Debug info from Net::FTP
by sgifford (Prior) on Apr 03, 2006 at 23:38 UTC
    It should show up in the HTTP error log, if you have access to that.

    You can probably redirect it to the Web page you're looking at with something like:

    open(STDERR,'>&STDOUT');
    but I haven't tested it.
Re: Where can I see the Debug info from Net::FTP
by marto (Cardinal) on Apr 04, 2006 at 08:30 UTC
Re: Where can I see the Debug info from Net::FTP
by boboson (Monk) on Apr 04, 2006 at 09:49 UTC
    Yes you're right,
    No one seemed to be able to answer that question, but they did anwser it here.