Solved

Need Help with Formmail.cgi

Posted on 2000-03-03
14
257 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
  • 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 400 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now