It points to a .pl script in the cgi-bin. The script is contact.pl
This is a generic contact form I've setup using good ol' Tele-Pro. Here is the source:
html:
CODE
<!-- Website Contact Form Generator -->
<!-- http://www.tele-pro.co.uk/scripts/contact_form/ -->
<!-- This script is free to use as long as you -->
<!-- retain the credit link -->
<form method="POST" action="/cgi-bin/contact.pl">
Fields marked (*) are required
<p>Email From:* <br>
<input type="text" name="EmailFrom">
<p>FirstName:<br>
<input type="text" name="FirstName">
<p><input type="submit" name="submit" value="Submit">
</form>
<p>
<!-- Contact Form credit link -->
Created by <a target="_blank"
href="http://www.tele-pro.co.uk/scripts/contact_form/">Contact
Form Generator</a>
<!-- http://www.tele-pro.co.uk/scripts/contact_form/ -->
<!-- This script is free to use as long as you -->
<!-- retain the credit link -->
<form method="POST" action="/cgi-bin/contact.pl">
Fields marked (*) are required
<p>Email From:* <br>
<input type="text" name="EmailFrom">
<p>FirstName:<br>
<input type="text" name="FirstName">
<p><input type="submit" name="submit" value="Submit">
</form>
<p>
<!-- Contact Form credit link -->
Created by <a target="_blank"
href="http://www.tele-pro.co.uk/scripts/contact_form/">Contact
Form Generator</a>
and the pl code:
CODE
#!/usr/bin/perl
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
print "Content-type: text/html \n\n";
# Website Contact Form Generator
# http://www.tele-pro.co.uk/scripts/contact_form/
# This script is free to use as long as you
# retain the credit link
# get posted data into local variables
$input = new CGI;
$EmailFrom = $input->param('EmailFrom');
$EmailTo = "mike\@eleganceindesign.com";
$Subject = "EID Online Market Lead";
$FirstName = $input->param('FirstName');
# validation
$validationOK=true;
if ($EmailFrom eq '') {$validationOK=false;}
if ($validationOK eq false) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
# prepare email body text
$Body .= "FirstName: ";
$Body .= "$FirstName";
$Body .= "\n";
# send email
$mailprog = '/usr/sbin/sendmail -t';
open(MAIL,"|$mailprog");
print MAIL "To: $EmailTo\n";
print MAIL "From: $EmailFrom\n";
print MAIL "Subject: $Subject\n\n";
print MAIL $Body;
close(MAIL);
# redirect to success page
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
use CGI::Carp qw(fatalsToBrowser);
use CGI qw(:standard);
print "Content-type: text/html \n\n";
# Website Contact Form Generator
# http://www.tele-pro.co.uk/scripts/contact_form/
# This script is free to use as long as you
# retain the credit link
# get posted data into local variables
$input = new CGI;
$EmailFrom = $input->param('EmailFrom');
$EmailTo = "mike\@eleganceindesign.com";
$Subject = "EID Online Market Lead";
$FirstName = $input->param('FirstName');
# validation
$validationOK=true;
if ($EmailFrom eq '') {$validationOK=false;}
if ($validationOK eq false) {
print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">";
exit;
}
# prepare email body text
$Body .= "FirstName: ";
$Body .= "$FirstName";
$Body .= "\n";
# send email
$mailprog = '/usr/sbin/sendmail -t';
open(MAIL,"|$mailprog");
print MAIL "To: $EmailTo\n";
print MAIL "From: $EmailFrom\n";
print MAIL "Subject: $Subject\n\n";
print MAIL $Body;
close(MAIL);
# redirect to success page
print "<meta http-equiv=\"refresh\" content=\"0;URL=ok.htm\">";
The problem is I get a generic 500 code when I try to execute the pl. So, I checked the log in cpanel and here's what it gave me:
Quote:
[Thu Nov 01 02:20:13 2007] [error] [client xx.xxx.xxx.xxx] File does not exist: /home/xxxxxx/xxxxxx/500.shtml, referer: http://www.eleganceindesign.com/emailtest.html
File does not exist...but it does, I can even go to cpanel's file manager and change permissions (which are 755 by the way), rename it, etc.
Any ideas as to what might be wrong server side to cause this?
It should be noted (from ssh) perl contact.pl produced:
CODE
Content-type: text/html
<meta http-equiv="refresh" content="0;URL=error.htm">
<meta http-equiv="refresh" content="0;URL=error.htm">
That is the error page if the form is not correct. So it looks like it function on the server.