in reply to Having a problem with Net::FTP, I think...

The script works fine in uploading the file. It quits on chmod with this error message.

Can you add  $ftp->debug(1); before you ask for username and such?

(Note: server specific information masked)

Preparing to put c:/testftp.cgi into **** on ****... c:/testftp.cgi uploaded successfully to **** at **** Unknown command S +ITE CHMOD. Press any key to exit

the file on Windows

hello world hello world hello world

The file on remote machine (Solaris)

[sk]% cat testftp.cgi hello world hello world hello world

Is your program stalling after  print "Preparing to put $element into $directory on $domain...\n"; or does it quit with some error message?

-SK

Replies are listed 'Best First'.
Re^2: Having a problem with Net::FTP, I think...
by Spidy (Chaplain) on Sep 05, 2005 at 23:52 UTC
    It is stalling after print "Preparing to put $element into $directory on $domain...\n";.
      After turning on $ftp->debug(1);, this was what was returned at the stallpoint:
      Net::FTP=GLOB(0x18bbb90)>>> ALLO 5012 Net::FTP=GLOB(0x18bbb90)<<< 200 Zzz... Net::FTP=GLOB(0x18bbb90)>>> PORT ***** Net::FTP=GLOB(0x18bbb90)<<< 200 PORT command successful Net::FTP=GLOB(0x18bbb90)>>> STOR ****.cgi
        Hmmm...I think you are running into issues with your client/server and perhaps nothing to do with your script.

        You might want to try log-in to the server manually using a FTP program and then try uploading a file...I tried uploading (using your script) to a directory that i don't have permission and it quits with "permission denied" error message. So i am guessing it is not a permission issue.

        Do you have firewalls running?

        Another way to check the script is to login into the server (ssh/telnet/rlogin etc. if you can) and then try to run the program on the same server. if you can upload the file then it is your remote machine that is causing the issue.

        cheers

        SK