I want to have a form on my site and to try it out Ive created a little testform. I really dont know much about these things but Ive tried my best and it simply wont work. Im not sure if Ive installed formmail (ver 1.92) wrong or if its the form itself.
Formmail:
I downloaded it and opened the file in wordpad. First I checked the #!/usr/bin/perl at the top and that is what it is supposed to be. Then I changed the $mailprog = '/usr/lib/sendmail -i -t'; into $mailprog = '/usr/sbin/sendmail -i -t';. And last, I changed the @referers into @referers = ('my domain-name without www','my sites IP');. Then I copied it to my cgi-bin and chmoded it 755. Is this the correct way to install formmail?
The form:
To try to get the form to talk to formmail Ive done this:
<FORM action="http://www.my website dot ext/cgi-bin/formmail.pl" method="post" name="letter">. Is this correct? Do I need anything else?
I really do need help
Helena
"Bad Referrer - Access Denied
The form attempting to use FormMail resides at http: //www dot my domain name dot ext/test, which is not allowed to access this cgi script.
If you are attempting to configure FormMail to run with this form, you need to add the following to @referers, explained in detail in the README file.
Add 'www.dot my domain name dot ext' to your @referers array."
This I have done! Ive tried both with and without www, Ive also tried my domain name dot ext /cgi-bin
This does my head in....
The form attempting to use FormMail resides at http: //www dot my domain name dot ext/test, which is not allowed to access this cgi script.
have you tried adding the exact url from the error message? The full url to the form added to the the @referers array?
ie
http: //www dot my domain name dot ext/test
Surfing my hosts webpage for information I found this though:
"What is the path to my web site, www directory?
/home/sites/yoursitenumber/web". Maybe this is what I have to use. I have no idea what my site number is though, so I will have to write to them. If that doesnt work I think Ill try php instead.
Thankyou very much for all your help and good advice, I really appreciate it :)
Helena
Important rules when debugging are 1. don't get fustrated easily 2. pay attention to error messages
Sticky-mail me your actual URL if you wish, so I can try to help futher and see what the URL resolves to vs. what you might think it is. If you are on a shared server there might be some minor issues with the way the domain is resolved. Setting up formmail should take minutes, not days. Sorry you are having so much trouble.
As an alternative, you might want to try the NMS flavor of formmail, which is also secure and is just a variation of the original formmail code: [prdownloads.sourceforge.net...]
[scriptarchive.com...]
Necessary Form FieldsThere is only one form field that you must have in your form, for FormMail to work correctly. This is the recipient field.
Syntax: <input type=hidden name="recipient" value="email@your.host.com">
Now something extra I do to slow down spammers, is I don't actually use that field in my HTML, and just patch the formmail cgi. Search for the line that starts with %Config = ('recipient','' and make it say instead
%Config = ('recipient','youremail@yourdomain.com'
Then your test page should work even without a recipient field (as it is now).