carpetpaul
04-24-2005, 12:44 PM
I'm having a nightmare......trying to get a site based in my isp's freespace to use a formmail script that lies on my main site thats got it's own host. Please view the following bits of code :-
Thanks for looking at this form me ! - Paul
------------------
1, I wondered if this form action part of the code may not be getting the user of the form to the location marked here, i can confirm that the filename of the formail script is correct.
<HTML><HEAD>
<TITLE>Full registration</TITLE>
<!--This code links this page to use the external .css file-->
<link rel="stylesheet" type="text/css"
href="test.css" /></HEAD>
<!-- this code directs the form to the script-->
<FORM action="http://www.cleveleyscarpetcentre.co.uk/cgi-bin/formmail2.cgi" method="POST">
------------------
2, The first line on the formail script (based at the remote server) is shown here, not exactly sure if this needs to be modified when you consider that the form is to be accessed from outside the server that contains the form script
#!/usr/bin/perl -w
----------------
3, Here are the variables within the formail script, I'll give you the exact details of the site that is to use this form, and the email that I need to send the form contents to :-
The site is: myweb.tiscali.co.uk/blackpoolsingles
The email is: me-me-me@tiscali.co.uk
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/lib/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 = ('myweb.tiscali.co.uk');
# @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 = &fill_recipients('me-me-me@tiscali.co.uk');
# 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
----------------
and here is the error message that I get:-
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@cleveleyscarpetcentre.co.uk 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.
--------------------------------------------------------------------------------
Apache/1.3.33 Server at www.cleveleyscarpetcentre.co.uk Port 80
Thanks for looking at this form me ! - Paul
------------------
1, I wondered if this form action part of the code may not be getting the user of the form to the location marked here, i can confirm that the filename of the formail script is correct.
<HTML><HEAD>
<TITLE>Full registration</TITLE>
<!--This code links this page to use the external .css file-->
<link rel="stylesheet" type="text/css"
href="test.css" /></HEAD>
<!-- this code directs the form to the script-->
<FORM action="http://www.cleveleyscarpetcentre.co.uk/cgi-bin/formmail2.cgi" method="POST">
------------------
2, The first line on the formail script (based at the remote server) is shown here, not exactly sure if this needs to be modified when you consider that the form is to be accessed from outside the server that contains the form script
#!/usr/bin/perl -w
----------------
3, Here are the variables within the formail script, I'll give you the exact details of the site that is to use this form, and the email that I need to send the form contents to :-
The site is: myweb.tiscali.co.uk/blackpoolsingles
The email is: me-me-me@tiscali.co.uk
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/lib/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 = ('myweb.tiscali.co.uk');
# @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 = &fill_recipients('me-me-me@tiscali.co.uk');
# 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
----------------
and here is the error message that I get:-
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, webmaster@cleveleyscarpetcentre.co.uk 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.
--------------------------------------------------------------------------------
Apache/1.3.33 Server at www.cleveleyscarpetcentre.co.uk Port 80