|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I'm creating a javascript form (for a games company) to take "pre-orders" from past buyers and potential buyers. When the form is filled out and the Submit button is pressed, an e-mail of this information is supposed to be sent to a certain e-mail recipient, but this isn't happening. Instead, it returns a 404 error. Can someone please explain why?
This is the test page with the form: http://www.jeffs-icons.net/sv/formTest-01.html This is the code (with some of the input fields removed: <P ALIGN=center> <form method=POST action="/cgi-bin/contact"> <input type=hidden name="recipient" value="russell9387@runbox.com"> <input type=hidden name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT"> <input type=hidden name="bgcolor" value="#ffffff"> <input type=hidden name="text_color" value="#000000"> <input type=hidden name="return_link_url" value="http://www.jeffs-icons.net"> <input type=hidden name="return_link_title" value="Back to My Page"> <FONT COLOR="#FFFFFF"> <table border="0" cellpadding="0" cellspacing="10" width="520"> <td>Organization Name:</td><td><input name="Organization" type="text" rows=1 size="37"></td> </tr> <tr> <td>Contact Person Name & Title:</td> <td><input name="Contact" type="text" rows=1 size="37"></td> </tr> <tr> <td>Address:</td> <td><input name="Address" type="text" rows=1 size="37"></td> </tr> <tr> <td>Country:</td> <td><input name="Country" type="text" rows=1 size="16"></td> </tr> <tr> <td>Number of units you expect to order:</td> <td><input name="Units" type="text" rows=1 size="16"></td> </tr> </table> <center><input type="Submit" value="Submit"><input type="Reset"> </form> |
|
|||
|
Easy enough to explain. /cgi-bin/contact on the test server doesn't exist. contact doesn't seem like a valid script name. You'll need to change that script name to something that exists for it to work.
Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies |
|
|||
|
Your right, in that it's not a valid script name -- "contact" is the valid name of a folder on my server. It seems that I should put something in that folder to make the script work, but what!
|
|
|||
|
Probably some sort of a form mailer. Just make sure you turn the security options on so you don't have a spam mailer as well.
Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies |
|
|||
|
Yes, a form mailer is what I needed. I got a free one here:
http://www.scn.org/~bb615/scripts/sendform.html You place it in your cgi bin and edit the form to direct it there "on submit." It still doesn't work yet because of some kind of server error. It's a "500" error which can be caused by a number of things. The ones I checked were these: make sure the script was uploaded in ascii format make sure your have set the permissions make sure the shebang line is correct ie: #!/usr/bin/perl The first two were good but the third was different in my mailer cgi script. It read: #!/usr/bin/local/perl The shebang line on all the other working scripts on my server don't have the string "/local" so I removed it -- still didn't work. Then I looked at my server error log to get some kind of specific description of the errors and so it turns out to be this: "Premature end of script headers" OK -- so how do I prevent my script headers from ending prematurely? |
|
|||
|
If you have command line access to your server, simply run the script with ./scripname.cgi to get the actual errors. Otherwise, it could be tough to tell what the exact problem is. It is usually the FTP problems or permissions problems, but there are other issues that could arise.
If you can run it from the command line, then it will take more digging to find the problem. Brian.
__________________
ToolBarn.com, an Internet Retailer Top 500 and Inc. 500 Company | Tool Parts | Pet Supplies |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |