Welcome to WebmasterWorld Guest from 18.208.159.25

Forum Moderators: travelin cat

Message Too Old, No Replies

Help with formmail

Formmail

     
4:00 pm on Apr 12, 2006 (gmt 0)

New User

10+ Year Member

joined:Apr 12, 2006
posts:3
votes: 0


trying desperatly to use formmail for the first time within golive but have just been failing misreably. I've ftp'd the formmail.pl file into the required cgi-bin, and have edited it as such:

$mailprog = '/usr/lib/sendmail -i -t';

@referers = ('scriptarchive.com','p************s.co.uk');

@recipients = &fill_recipients('******@******.com');

@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');

i have been advised the following:
"it appears the FormMail.pl script contained Windows characters. We fixed the problem by running the script through 'dos2unix'"
but ive tried this and still can't get it to work (the coding looks exactly the same to me)

can anybody help?
which windows characters are contained and how do i change them?
any help will be greatly appreciated

6:20 pm on Apr 12, 2006 (gmt 0)

Moderator This Forum from US 

WebmasterWorld Administrator travelin_cat is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Feb 28, 2004
posts:3294
votes: 19


jinderkang,

What are you using to ftp? You may have it configured incorrectly. You should send it as text only. You may not be able to actually "see" any characters as it could be the line breaks that are causing the problem...

FYI, we use GoLive to edit the scripts, but use Fetch to FTP.

6:37 pm on Apr 12, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 23, 2003
posts:801
votes: 0


Welcome to WebmasterWorld, jinderkang

A silly question, but having ftp'd the file up there, have you given it execute permissions?

DerekH

8:48 am on Apr 13, 2006 (gmt 0)

New User

10+ Year Member

joined:Apr 12, 2006
posts:3
votes: 0


cheers for the replies guys...
I'm using fetch to ftp, and have set the permissions to chmod755, now pulling out my hair as i'm sure its down to the configuration, but can't see where mistakes have been made... do i have to change any characters so that they work further down the script?
9:11 am on Apr 13, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:May 23, 2003
posts:801
votes: 0


I did have a problem with my htpasswd file once - got some Windows end-of-line characters in there, and whatever I edited the file with on my Mac, I couldn't see what was wrong - simply that only some of the passwords in there seemed to work.

Eventually, I telnet-ed into my webserver and opened the file up there with EMACS. It was then blindingly obvious what was wrong. There were CTRL-Ms on some of the password strings, and these were causing it to choke.

This might not help at all, I'm quick to say, but it might be prudent to see what actually IS on the webserver using an editor native to the webserver...
DerekH

9:28 am on Apr 20, 2006 (gmt 0)

New User

10+ Year Member

joined:Apr 12, 2006
posts:3
votes: 0


cheers for all the help... got it working! woo hoo