FormMail.pl not working and I don't know why...

benfrain

New member
Joined
Nov 15, 2006
Messages
2
I have a very simple form set up on my site. However, whenever I submit it I get the following error...

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

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. "


I have checked permissions (755) on the FormMail.pl file. Here is how I have the file amended so far..


#!/usr/bin/perl
##############################################################################
# FormMail Version 1.92 #
# Copyright 1995-2002 Matt Wright [email protected] #
# Created 06/09/95 Last Modified 04/21/02 #
# Matt's Script Archive, Inc.: http://www.scriptarchive.com/ #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1995-2002 Matthew M. Wright All Rights Reserved. #
# #
# FormMail may be used and modified free of charge by anyone so long as this #
# copyright notice and the comments above remain intact. By using this #
# code you agree to indemnify Matthew M. Wright from any liability that #
# might arise from its use. #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact. #
##############################################################################
# ACCESS CONTROL FIX: Peter D. Thompson Yezek #
# http://www.securityfocus.com/archive/1/62033 #
##############################################################################
# Define Variables #
# Detailed Information Found In README File. #

# $mailprog defines the location of your sendmail program on your unix #
# system. The flags -i and -t should be passed to sendmail in order to #
# have it ignore single dots on a line and to read message for recipients #

$mailprog = '/usr/sbin/sendmail -i -t';

# @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 = ('spiralfilm.com','benfrain.com');

# @recipients defines the e-mail addresses or domain names that e-mail can #
# be sent to. This must be filled in correctly to prevent SPAM and allow #
# valid addresses to receive e-mail. Read the documentation to find out how #
# this variable works!!! It is EXTREMELY IMPORTANT. #
@recipients = ([email protected]);

# ACCESS CONTROL FIX: Peter D. Thompson Yezek #
# @valid_ENV allows the sysadmin to define what environment variables can #
# be reported via the env_report directive. This was implemented to fix #
# the problem reported at http://www.securityfocus.com/bid/1187 #

@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');

# Done #
##############################################################################


As far as I am aware there is nothing else to configure???

What am I getting wrong?

I had a look at the log but although I can see errors I can't understand what is causing it...


[Mon Jan 15 22:40:59 2007] [error] [client 84.67.9.172] Premature end of script headers: /home/benfrain/domains/benfrain.com/public_html/cgi-bin/FormMail.pl
[Mon Jan 15 22:40:59 2007] [error] [client 84.67.9.172] File does not exist: /home/benfrain/domains/benfrain.com/public_html/500.shtml


Can anybody help me here?
 
Who owns the file?

Was it uploaded as ASCII?

Is it in the cgi-bin subdirectory?

Jeff
 
The file is mine (amended FormMail script) - is that what you meant?

Uploaded through Dreamweaver 8 - could that be a problem? Does it not do ASCII?

Yes, in the cgi-bin directory.
 
I meant the ownership of the file. If you uploaded it using Dreamweaver it's most likely owned by your username, which is what it should be.

I have no idea if Dreamweaver understands ascii uploads or not; you'll have to check your documentation.

You should use FTP (unless dreamweaver does it) to make your file executable. It's rights need to be 755.

This topic is a User Difficulty; I'm moving it to the proper forum.

Jeff
 
Back
Top