?
Solved

Need Help with Formmail.cgi

Posted on 2000-03-03
14
Medium Priority
?
269 Views
Last Modified: 2013-12-25
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
Comment
Question by:christiesgifts
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 6
14 Comments
 
LVL 6

Expert Comment

by:andreif
ID: 2581992
What kind of problem you have?
0
 
LVL 1

Expert Comment

by:chaduka
ID: 2582788
If you read the README file that comes with the CGI application, you should be able to run it with no problems.
0
 

Author Comment

by:christiesgifts
ID: 2582852
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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
LVL 1

Expert Comment

by:chaduka
ID: 2583151
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
 

Author Comment

by:christiesgifts
ID: 2583660
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
 
LVL 1

Expert Comment

by:chaduka
ID: 2584649
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
 

Author Comment

by:christiesgifts
ID: 2584811
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
 
LVL 1

Expert Comment

by:chaduka
ID: 2584911
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
 

Author Comment

by:christiesgifts
ID: 2585275
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
 
LVL 1

Expert Comment

by:chaduka
ID: 2586505
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
 

Author Comment

by:christiesgifts
ID: 2589102
Adjusted points to 400
0
 

Author Comment

by:christiesgifts
ID: 2589103
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
 
LVL 1

Accepted Solution

by:
chaduka earned 1600 total points
ID: 2590418
Aaaah, I am happy you got it working!
....and ummmm, thanx for the 400points!!
hehe. :)
0
 

Author Comment

by:christiesgifts
ID: 2591258
Chaduka's help was most appreciated.  My forms are now working and I learned something along the way.  Thanks!  
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question