This is a Perl / Sambar Server question - Posting to both groups...

Hi, Ive got a CGI script that automatically uploads to my test server...

If anyone is online now, can they go to :-

http://kwister.dns2go.com/cgi-bin/upload.cgi

It wont do anything (on screen) except it uploads a test file in my CGI 
directory, into the FTP directory...

However - When I try it, it displays all this information on my browser, Im 
not sure if it is created by the
Net::Ftp::Common file (CGI), or the Sambar server.... (see below for text)

If its with the Sambar Server - How can I turn it off ?

- I want it, if someone is manually FTP'ing etc..  but not in an automated 
/ CGI script...

CGI QUESTION :- (if i cant turn it off, How can i re-direct the output, 
into a variable / Array) ?

PS, my CGI script, says "Uploaded" at the end, however when I try it, it 
displays the FTP details (which i dont want..)
and the "uploaded" message before the FTP details.

Is this normal ? - When i tried to use 'send' - before - I dont remember 
seing the FTP messages...

G.
<curious>


Message on screen :- - CGI script below it....

------------------

Uploaded
Net::FTP: Net::FTP(2.61)
Net::FTP:   Exporter(5.562)
Net::FTP:   Net::Cmd(2.20)
Net::FTP:   IO::Socket::INET(1.25)
Net::FTP:     IO::Socket(1.26)
Net::FTP:       IO::Handle(1.21)

Net::FTP=GLOB(0x1ce6f48)<<< 220-Sambar FTP Server Version 5.0
Net::FTP=GLOB(0x1ce6f48)<<< 220 Your FTP Session will expire after 900 
seconds of inactivity.
Net::FTP=GLOB(0x1ce6f48)>>> user anonymous
Net::FTP=GLOB(0x1ce6f48)<<< 331 Password required for anonymous
Net::FTP=GLOB(0x1ce6f48)>>> PASS ....
Net::FTP=GLOB(0x1ce6f48)<<< 230-Welcome to the Sambar FTP Server
Net::FTP=GLOB(0x1ce6f48)<<< 230 OK
Net::FTP=GLOB(0x1ce6f48)>>> CWD /
Net::FTP=GLOB(0x1ce6f48)<<< 250 Changed to /
Net::FTP=GLOB(0x1ce6f48)>>> TYPE A
Net::FTP=GLOB(0x1ce6f48)<<< 200 TYPE is now ASCII
Net::FTP=GLOB(0x1ce6f48)>>> PORT 202,180,96,188,5,67
Net::FTP=GLOB(0x1ce6f48)<<< 200 PORT command successful.
Net::FTP=GLOB(0x1ce6f48)>>> STOR cloud.txt
Net::FTP=GLOB(0x1ce6f48)<<< 150 Opening ASCII mode data connection.
Net::FTP=GLOB(0x1ce6f48)<<< 226 Transfer complete.
Net::FTP=GLOB(0x1ce6f48)>>> QUIT
Net::FTP=GLOB(0x1ce6f48)<<< 221-Server disconnecting.
Net::FTP=GLOB(0x1ce6f48)<<< 221 Goodbye.

------------------

CGI Script :-

--------------------------

use Net::ftp::Common;

our %netftp_cfg =
     (Debug => 1, Timeout => 120);

  our %common_cfg =
     (
  # The first 2 options, if not present, lead to relying on .netrc for login
   User => 'anonymous',
   Pass => 'test',
      # Other options

      #LocalDir  => '/tmp/downloads'   # setup something for $ez->get
      #LocalFile => 'delete.zip'       # setup something for $ez->get
      Host => 'kwister.dns2go.com',          # overwrite ftp.microsoft.com 
default
      Dir  => '/',                    # overwrite slash DIR default
      Type => 'A'                     # overwrite I (binary) TYPE default
      );

my $ez = Net::FTP::Common->new(\%common_cfg, %netftp_config);
$ez->send(File => 'cloud.txt');

print "Content-type: text/html\n\n";
print "Uploaded";

-------------------------------------------------------
To unsubscribe please go to http://www.sambar.ch/list/




Reply via email to