• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 273
  • Last Modified:

Need Help with Formmail.cgi

Cannot understand formmail.  Need it to run forms on my husband's website.  CGI host is Icom.com.  Can someone help?  If you need additional info email me at stewartlimo@hotmail.com.  Thank you!!!!
0
christiesgifts
Asked:
christiesgifts
  • 7
  • 6
1 Solution
 
andreifCommented:
What kind of problem you have?
0
 
chadukaCommented:
If you read the README file that comes with the CGI application, you should be able to run it with no problems.
0
 
christiesgiftsAuthor Commented:
TO: andreif -- error message says to add www.icom.com to array?!  not sure how to do this.  When I tried it did not work.

TO: chaduka -- will read the README file and see if that helps. I'm overwhelmed by all the garble on the formmail file page.
0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
chadukaCommented:
Ok, the error message you got is because the script needs to be told of "trusted" servers/referers. Just type in www.icom.com in the @referers = ( .... ) thingie. This helps prevent unauthorised use of this script from other servers.

Hope this helps.
0
 
christiesgiftsAuthor Commented:
Thanks chaduka -- I'm almost there.  I added www.icom.com to the referrers area and uploaded the file to the cgi-bin on the server.  The form still does not work; however, I believe it because the coding is incorrect within the form page.  Do you know how it should read?  This is how it currently reads within the script?!

<form method="post" action="http://www.stewartlimo.com/cgi-bin/Formmail.pl" name="/cgi-bin/Formmail.pl">

My formmail file is named: formmail.cgi.  I tried replacing the .pl with .cgi and that did not work.
I'll up the points to 400 if you can get it working. Thanks!!!  Your help is much appreciated.
0
 
chadukaCommented:
Ok, (errrr, 400!!? hehe) Well, points are not really my worry. Getting your stuff to work is. :)

Hmmmm, I don't quite get your setup. Where does your HTML file reside? If it's on http://www.stewartlimo.com, add www.stewartlimo.com to the @referers=( ... ) list. This list should contain names of servers or URLs on which the form resides. So, if you have your form at http://www.icom.com, and your CGI script is on http://www.stewartlimo.com, it should work. Errr, drop the name="/cgi-bin/Formmail.pl" part in your <form ...> tag. I assume that since you got a msg to add www.icom.com to array, you can execute CGI scripts on that server after all! :) If this doesn't work, I request to see both the HTML file with the form, and your formmail.pl configurations.

Good Luck!
0
 
christiesgiftsAuthor Commented:
Hi Chaduka:

Still no luck.  Here is what is actually on my files.  If you need copies of the whole files -- send me your email address and I will attach them and send them to you.  Thanks!!!
stewartlimo@hotmail.com


THE MESSAGE BELOW IS INCOMPLETE, HOWEVER, THIS IS WHAT I NOW
RECEIVE WHEN TRYING TO SUBMIT THE FORM.

Bad Referrer - Access Denied      

The form attempting to use  resides at www.stewartlimo.com.

Please add ‘www.stewartlimo.com’ to your @referrers array.



THE CODING BELOW IS WHAT IS ON THE FORM ITSELF.

<form method="post" action="http://www.stewartlimo.com/cgi-bin/formmail.cgi"
name="/cgi-bin/formmail.cgi"><input type=hidden name="subject" value="Stewartlimo
Reservation Form"><input type=hidden name="recipient"
value="info@stewartlimo.com">



THE INFORMATION BELOW IS WHAT IS ON MY FORMMAIL.CGI FILE.

# @referers allows forms to be located only on servers which are defined     #
# in this field.  This security fix from the last version which allowed      #
# anyone on any server to use your FormMail script on their web site.        #

@referers = ('hypermart.net',
'207.31.80.4',
'207.31.80.5',
'207.31.80.6',
'207.31.80.7',
'207.31.80.8',
'207.31.80.9',
'207.31.80.10',
'207.31.80.11',
'207.31.80.12',
'207.31.80.13',
); ('www.icom.com'); ('www.stewartlimo.com');

# Done  






















0
 
chadukaCommented:
Ok, I see where your problem is. You added the values I told you to outside the referers array. Do it like this:

   ============ FORM ==============
<form method="post" action="http://www.stewartlimo.com/cgi-bin/formmail.cgi">
<input type=hidden name="subject" value="Stewartlimo
Reservation Form"><input type=hidden name="recipient"
value="info@stewartlimo.com">

 ============ CGI SCRIPT ==============
@referers = ('hypermart.net',
'207.31.80.4',
'207.31.80.5',
'207.31.80.6',
'207.31.80.7',
'207.31.80.8',
'207.31.80.9',
'207.31.80.10',
'207.31.80.11',
'207.31.80.12',
'207.31.80.13',
'www.icom.com',
'www.stewartlimo.com',
);

Now, I don't see where www.icom.com comes into play, but I just added it anyway (..and those other IP addresses too).
Again, you don't need to have a "name" attribute in the form tag unless you are going to validate the input using some form of client-side validation, e.g. JavaScript.

Hope this helps!
0
 
christiesgiftsAuthor Commented:
Okay, I did what you said and uploaded the files to the server.  Now when I try to submit the form I get this message:

 "This Page Cannot Be Displayed"

The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.

In the bottom browser bar it says: CANNOT FIND SERVER

My goodness, why is this stuff so hard?!!!!!

Any other suggestions?  Should I take the www. out and just put: 'stewartlimo.com',
0
 
chadukaCommented:
No, don't remove the www! That error message is because the server running the cgi script could not service your request, maybe because it went offline or some technical problems on your network.
Try again.
0
 
christiesgiftsAuthor Commented:
Adjusted points to 400
0
 
christiesgiftsAuthor Commented:
Thanks, it's working!!!!!!! I have increased the points to 400.  Answer back and I will check the Accept Comment As Answer button.  BIG  THANKS!!!!!!
0
 
chadukaCommented:
Aaaah, I am happy you got it working!
....and ummmm, thanx for the 400points!!
hehe. :)
0
 
christiesgiftsAuthor Commented:
Chaduka's help was most appreciated.  My forms are now working and I learned something along the way.  Thanks!  
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now