View Full Version : nms formmail...help!

05-06-2009, 08:23 PM

Im trying to setup nms formmail. But is doesn't work for me.:confused:

I can't find the mistake. PLEASE help.:(

and I upload the email file to cgi-bin, and the permission there is 755

but I still get an error.

when I click "summit" on

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.


#!/usr/bin/perl -wT
# NMS FormMail Version 3.14c1

use strict;
use vars qw(
$DEBUGGING $emulate_matts_code $secure %more_config
$allow_empty_ref $max_recipients $mailprog @referers
@allow_mail_to @recipients %recipient_alias
@valid_ENV $date_fmt $style $send_confirmation_mail
$confirmation_text $locale $charset $no_content
$double_spacing $wrap_text $wrap_style $postmaster

# -------------------
# FormMail.pl Version 3.14c1
# This program is licensed in the same way as Perl
# itself. You are free to choose between the GNU Public
# License <http://www.gnu.org/licenses/gpl.html> or
# the Artistic License
# <http://www.perl.com/pub/a/language/misc/Artistic.html>
# For help on configuration or installation see the
# README file or the POD documentation at the end of
# this file.

# --------------------------
# Modify these to your own settings. You might have to
# contact your system administrator if you do not run
# your own web server. If the purpose of these
# parameters seems unclear, please see the README file.
$emulate_matts_code= 0;
$secure = 1;
$allow_empty_ref = 1;
$max_recipients = 1;
$mailprog = '/usr/sbin/sendmail -oi -t';
$postmaster = '';
@referers = qw(mckinlay.us.com localhost);
@allow_mail_to = qw(andrew@mckinlay.us.com localhost);
@recipients = ();
%recipient_alias = ('1'=>'andrew@mckinlay.us.com');('2' => 'fivestar@mckinlay.us.com')
$locale = '';
$charset = 'iso-8859-1';
$date_fmt = '%A, %B %d, %Y at %H:%M:%S';
$style = '/css/nms.css';
$no_content = 0;
$double_spacing = 1;
$wrap_text = 0;
$wrap_style = 1;
$address_style = 0;
$send_confirmation_mail = 0;
$confirmation_text = <<'END_OF_CONFIRMATION';
From: you@your.com
Subject: form submission

Thank you for your form submission.


# You may need to uncomment the line below and adjust the path.
# use lib './lib';


05-06-2009, 09:13 PM
Have you checked the web server error log? I should give you a clue to the problem.

Did you upload from a Windows box to a *nix server?

Did you ftp the file to the server or use another method? If via ftp, did you upload in ascii or binary mode?

05-06-2009, 09:21 PM
I uploaded fmsx.pl in to the cgi-bin as ASCII. Permission 755

The error logs:

ror] [client] File does not exist: /home/mckinlay/public_html/500.shtml
[Wed May 06 15:06:27 2009] [error] [client] File does not exist: /home/mckinlay/public_html/500.shtml, referer: http://mckinlay.us.com/MCK-contact-us.html

No idea what it means:(

Any idea???



05-06-2009, 10:02 PM
When I try the URI of the script all I see is a blank page:


and in the source code of the blank page all I see is an html comment tag:



That could be the server trying to redirect to an error page though.

05-06-2009, 10:58 PM
I uploaded fmsx.pl in to the cgi-bin as ASCII. Permission 755

The error logs:

ror] [client] File does not exist: /home/mckinlay/public_html/500.shtml
[Wed May 06 15:06:27 2009] [error] [client] File does not exist: /home/mckinlay/public_html/500.shtml, referer: http://mckinlay.us.com/MCK-contact-us.html

No idea what it means:(

Any idea???


the errors must be in log file before the lines you posted. This message just say that you don't have a page for error 500. The script probably end with a 'premature end of script header' and a line number.

best regards

05-07-2009, 03:21 PM

This is my HTML , I don't receive any emails, and is no redirecting to the proper pages. What its wrong?

Please help

<!-- Begin Form -->
<form method="post" action="http://www.mckinlay.us.com/cgi-bin/fmsx.pl" name="form1" id="form1" style="margin-top: 0pt;" onsubmit="return formCheck()" autocomplete="off">
<input name="recipient" value="1" type="hidden">
<input name="redirect" value="http://www.mckinlay.us.com/MCK-confirm.html" type="hidden">
<input name="missing_fields_redirect" value="http://www.mckinlay.us.com/MCK-missing.html" type="hidden">
<input name="required" value="email,message" type="hidden">
<table summary="" border="0" cellpadding="0" cellspacing="0" width="420">

<td valign="top" width="210">
<span class="formtext">Name:</span>
<input name="realname" id="realname" class="form1" value="" style="height: 18px;" onkeypress="return handleEnter(this, event)" type="text" size="20">
<span class="formtext">E-mail:</span>&nbsp;<span class="required">(required)</span>

<input name="email" id="email" class="form1" value="" style="height: 18px;" onkeypress="return handleEnter(this, event)" onchange="stripSpace(this)" type="text" size="20">
<span class="formtext">Phone:</span>
<input name="phone" id="phone" class="form1" value="" style="height: 18px;" onkeypress="return handleEnter(this, event)" type="text" size="20">

<input src="Images/submit.jpg" style="margin-right: 20px;" alt="submit" align="left" type="image" width="69" height="21" name="summit">
<input type="image" src="Images/reset.jpg" alt="reset" onClick="resetForm();document.form1.reset();return false;" width="59" height="21" name="I1">
<td valign="top" width="210">
<span class="formtext">Message:</span>&nbsp;<span class="required">(required)</span>
<textarea name="message" id="message" cols="24" rows="6" class="form2"></textarea>

<!-- End Form -->

05-07-2009, 03:47 PM
As oesxyl already said, the error message that we need is prior to the one you posted. Take another look at the log file and post all error messages relating to accessing/executing the fmsx.pl script.

05-07-2009, 03:50 PM
This are all the error logs

Error Log
Last 300 Error Log Messages in reverse order:

[Thu May 07 09:47:14 2009] [error] [client] File does not exist: /home/mckinlay/public_html/favicon.ico
[Thu May 07 09:41:24 2009] [error] [client] File does not exist: /home/mckinlay/public_html/favicon.ico
[Thu May 07 09:32:40 2009] [error] [client] File does not exist: /home/mckinlay/public_html/favicon.ico

05-07-2009, 04:07 PM
That error is an entirely separate issue.

We need to see the errors that relate to the form submission to the fmsx.pl script, but exclude all favicon.ico errors.

05-07-2009, 04:14 PM
In cpanel- error logs
all those the only error recorded

Where I can find the errors logs???

05-07-2009, 04:31 PM
In cpanel- error logs
all those the only error recorded

Where I can find the errors logs???

That depends on how the server was setup. Do you have telnet or ssh access to the server. If so, then a common location to find it would be:

It might be easier just to monitor your cpanel log as you submit the form.

05-07-2009, 04:51 PM
I don't know what server I have:confused:
I try the location but is not under etc folder.

General server information:
Operating system Linux
Service Status Click to View
Kernel version
Machine Type i686
Apache version 2.2.11 (Unix)
PERL version 5.8.8
Path to PERL /usr/bin/perl
Path to sendmail /usr/sbin/sendmail
Installed Perl Modules Click to View
PHP version 5.2.9
MySQL version 5.1.30
cPanel Build 11.24.4-RELEASE 35075
Theme cPanel X v2.6.0

05-07-2009, 05:39 PM

Error: GET request

The HTML form fails to specify the POST method, so it would not be correct for this script to take any action in response to your request.

If you are attempting to configure this form to run with FormMail, you need to set the request method to POST in the opening form tag, like this: <form action="/cgi-bin/FormMail.pl" method="post">

What it means????? Solution???

05-07-2009, 05:57 PM
Its working!!!!!!!!!!!!!!:thumbsup:

I changed

<form method="post" action="http://www.mckinlay.us.com/cgi-bin/fmsx.pl" "

<form method="post" action="/cgi-bin/fmsx.pl" name="form1" id="form1"

and works!
Don't understand why but I received the email.

05-07-2009, 06:12 PM
I get the "Bad Referrer - Access Denied" page as expected when directly accessing the script.

Double check your form page and make sure the method is set to post and, for now, remove any javascript calls from the form. You could add the javascript back in after testing.

05-11-2009, 07:39 PM

Is the scipt you used for Windows IIs7? I've been having the same problem though using a different script that is "supposed" to work for either Windows or Unix. bnbform.cgi

This is an internal site so I cannot give URLs to see.

05-12-2009, 02:01 AM
erm, sorry if this sounds like I am volunteering people for a job but...I /we have seen numerous nms-formmail questions and I wonder if it would save time for a knowledgable person to prpovide a tutorial as a sticky. would it save time all around?

If I knew how to do it I would! and If no-one does it soon, I shall try to find time. But, generally, I have written my own form, by accident :) .


05-12-2009, 02:25 AM
nms-formail comes with pretty extensive instructions and I believe example code

05-25-2009, 11:52 PM
To whom it may concern

I found an intresting thread about NMS FormMail. I believe something that is not mentioned in the provided documents.

I struggled to install this formmail as well. This thread helped me a lot.

I quote:

To whom it may concern,

If you are trying to install the NMS FormMail and you are getting the "HTTP 404 Page not found" message after submitting the form, but you have done exactly everything according the NMS FormMail install instructions (http://www.descreative.co.uk/readme.txt), then read below for the solution of a problem you might have.

Look for a .htaccess file in the root directory of the website host. This file is normally hidden, but will be shown if the Force showing hidden files option in your favourite FTP client program, such as FileZilla (http://www.descreative.co.uk/phpBB3/viewtopic.php?f=20&t=4), is enabled.

Search this .htaccess file for the command lines:

Options -Indexes
ErrorDocument 403 /index.html

These command lines protect the entire website from being indexed, if the .htaccess file is installed in the root directory of the website host.
For example:
The web browser returns a "HTTP 404 Page not found" message after submitting http://www.yoursite.com/images/.
The web browser will return a list of the installed files in that directory without this .htaccess file containing these command lines.

The .htacess file, containing these command lines, is not necessary in a directory or sub directory containing an index.htm, index.html or index.php etc., because the website host server will redirect the visitor automatically to the index page after submitting http://www.yoursite.com/ or http://www.yoursite.com/images/.

Delete these command lines to make your NMS FormMail script work.
If you still wish to protect particular directories or sub directories, without an index page, from being indexed, then install a new .htaccess file containing these command lines in that particular directory.


NMS FormMail returns "HTTP 404 Page not found" (http://www.descreative.co.uk/phpBB3/viewtopic.php?f=33&t=12)

I hope this helps some of you.