Debugging Your Setup
- You created a simple feedback form page.
- You took a run through the Iron Spider tutorial on how to install NMS FormMail.
- You filled in your feedback form and clicked on the submit button.
- You were confronted with an Application Error page or, worse, the dreaded 500 Internal Server Error page.
- You repeated steps C and D several times because you didn't know what else to do.
"NMS FormMail is a quality form-to-email Perl script. This is just a simple omission or typo on my part. It CAN be fixed."Alright then, so now that you are in the right frame of mind, let's get down to some simple debugging.
Error Messages
First let's deal with some common error messages that your web browser might have spit out after you clicked on the submit button in your feedback form.
- If you got the following error message:
Doublecheck in the HTML of your feedback form to make sure that you have the proper URL in the action attribute of theNot Found
The requested document was not found on this server.<form>start tag.
- If you got the following infamous error message:
Contact the server adminstrator? Yeah right... Been there. Done that. (*chuckle*)... Generally a waste of time.Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator blah blah blah...
You'd be better off to first try one or both of the following:
- Check the shebang line to make sure you have the correct path to Perl.
- Check the file permissions to see if they have been set correctly.
- If you got the following error message:
Application Error
An error has occurred in the program
close sendmail pipe failed, mailprog=[/usr/bin/sendmail -oi -t] at (eval 6) line 108(Red emphasis mine)
Doublecheck to make sure that you have the correct path to Sendmail.
(The part highlighted in red is an example only. The path to Sendmail varies from one server to the next. Check with your web host's technical support to verify this or, if they're not available, try this.)
- If you got the following error message:
This is fairly self-explanatory but if you still don't get it then what it's telling you is to return to step #2(c) and double-check to see that you have the right domain name entered.Bad Referrer - Access Denied
The form attempting to use this script resides at http://www.your_site.com/test/contact.htm, which is not allowed to access this program.
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.your_site.com' to your @referers array.
FormMail © 2001-2003 London Perl Mongers
Do It Over Again
As arduous as this may seem, sometimes the best solution to debugging your NMS FormMail setup may be to simply start over.
This is because chances are good that:
- You made some kind of slip-up when editing FormMail.pl and you blew away the syntax of the Perl scripting.
AND...
- You don't know the first thing about Perl scripting and hence don't know how to correct the syntax error.
One stray comma, quotation mark, period or whatever can cause a Perl script to suddenly turn up its nose and refuse to run. The result of this is usually an error page in your web browser that either makes no sense to you and/or tells you nothing (e.g. 500 Internal Server Error).
So if you've tried everything else and have now come to the point where you've decided to open up
FormMail.pl in a text editor and attempt to plow through a page full of Perlese (which might as well be written in ancient Egyptian heiroglyphics) looking for that stray comma... STOP. You might be better to just simply wipe the slate clean, extract a fresh copy of
FormMail.pl from your downloaded zip file and very carefully run through all the setup steps again. Operative words: very carefully.Helpful Links
Still stuck? Here's some links which may help you out:
-
Go here to download the most current version of NMS FormMail. If this is not the same as that which I make available for download on the installation page then by all means feel free to rattle my cage and kick my butt.
-
Go here for the answers to some frequently asked questions about NMS programs.
-
Go here to browse through questions and answers to see if someone else has already posted something relevant to your situation.
-
And finally (operative word: finally), go here to fill out an email form to ask NMS programmers to help you with your setup.
So up to now, we've been using a simple feedback form to avoid overwhelming newcomers with a truckload of HTML markup. You may, however, wish to create something that is a little more advanced. If so then continue on User Input Components which is the first in a series of pages rendering a complete rundown of all the stuff you can put in web forms...
| <~ BACK | TOP | NEXT ~> |
