Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Setup problem

by Rhys (Pilgrim)
on Sep 05, 2004 at 13:36 UTC ( #388605=note: print w/replies, xml ) Need Help??


in reply to Setup problem

Okay, I see several possible problems here. First, though, some protocol issues:

1) protocol, not protocall
2) Perl, not PERL
3) a lot, not 'alot'. (You wouldn't write 'alittle', would you?)
4) You did include an awful lot of stuff from the script, but no information about the system, nor about where you got the script. Those would have been helpful. You also didn't say what the script is doing. I assume it isn't working, but are there any error messages? Does it send mail, but it's empty? What exactly is the problem?

We really need the answer to 4) before we can help you. What happens when the form is submitted? Also, if you log on to the Web server via command line, what happens if you do:

perl -wc ./AlphaMail.pl

Lastly, let's confirm a few things for you:

1) /usr/sbin/sendmail is correct for $MailProgram.

2) As long as you used only WordPad or Notepad to edit the file, your mailer should not have done anything strange with it. If you're worried about newlines, log on to the Web server via SSH (or - egad! - Telnet) and run pico -w AlphaMail.pl or, if they don't have pico, try nano -w AlphaMail.pl. Once you have the file open, press Ctrl-O, Enter, Ctrl-X. If you had any newline/carriage return weirdness, it'll be gone.

3) All of the other variables in the 'configurable' part of the script are just strings used to construct the messages, so it doesn't really matter if they're correct or not.

So the only thing that comes to mind is, if you log on to the Web server and run /usr/sbin/sendmail -t, what does it do? If nothing appears to happen, but you don't get your prompt back, that's probably good. (Press Ctrl-C to abort sendmail.) If not, what happens instead?

Also, what did you use to FTP the file up to the server? Windows' command-line FTP util? Did you remember to use binary mode (type 'bin')? If not, you should send the file again (just overwrite the previous copy), making sure to use binary mode.

--J

Update: Added suggestion re: binary mode FTP.

Replies are listed 'Best First'.
Re^2: Setup problem
by Zaxo (Archbishop) on Sep 05, 2004 at 15:29 UTC

    Your advice about ftp binary mode is wrong. When you transfer a win32-ish text file in binary mode, the splatline is seen as "#!/usr/bin/perl\r". There is no such executable file, resulting in a "File not found" error. ASCII mode does line end translation and prevents such errors.

    After Compline,
    Zaxo

      This is only true if the file was originally created on a Win32 system. Wordpad (and maybe Notepad) can correctly edit a UNIX-style text file (sans \r) without mangling it, as the original script itself suggests, and the author says she did.

      I've have no end of trouble transferring things in ASCII mode. The only time I've used any mode other than binary was when I sent a text file to a VAX using EBCDIC mode (bleh!). If I have to do some file cleanup - whether by using the 'pico cheat' or a cleanup Perl script - that's fine, but I'd rather do it myself than have my file transfer program doing things for me.

      Which is why I use Linux and write my own Perl code. :-) I don't do everything myself, but I want the option.

      NOTE: I sent e-mail to the author of the original post shortly after she posted it. No reply yet, and AFAIK, she only came back to the site once or twice to see if there were any answers.

Re^2: Setup problem
by sintadil (Pilgrim) on Sep 06, 2004 at 11:44 UTC

    You wouldn't write 'alittle', would you?

    You'd be surprised how many people do.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://388605]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2020-11-26 21:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?