Forum Moderators: travelin cat

Message Too Old, No Replies

formmail.pl is not working

         

LasJas

1:00 am on May 28, 2004 (gmt 0)

10+ Year Member



HELP! Need help with formmail.pl. This is what we have done so far:
moved formmail.pl into CGI-executables
edtied HTML form
<body bgcolor="#f5f5dc" tracingopacity="50" tracingsrc="cgi-bin/FormMail.pl">
<h1 align="center"><u><strong>Application</strong></u></h1>
<FORM method="post" action="/cgi-bin/FormMail.pl">
<input type=hidden name="recipient" value="info@XXXXXXXXXX.com">
<input type=hidden name="subject" value="New Application">
<input type=hidden name="redirect" value="http://www.XXXXXXXXXXX.com/thankyou.htm">
<p>&nbsp;</p>

I am getting 500 Internal Server Error

I suspect its in the formmail.pl line 52 "@valid_ENV = ('REMOTE_HOST','REMOTE_ADDR','REMOTE_USER','HTTP_USER_AGENT');

because when I run the script from the terminal gives me syntax error at ./FormMail.pl line 52, near "@valid_ENV "

Any help would be appreciated!

LasJas

1:24 am on May 28, 2004 (gmt 0)

10+ Year Member



Here is the exact error message after when i click my "submit" button:

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

Please contact the server administrator, [no address given] 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.

Apache/1.3.29 Server at <snip>

[edited by: Macguru at 4:16 pm (utc) on May 28, 2004]
[edit reason] removed specifics [/edit]

travelin cat

3:59 pm on May 28, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



In formmail, you need to alter the code to add the domain that the script resides in. It looks like this:

@referers = ('http://****.com');

where xxx.com is the domain name.

Also, make sure the script is 755 executable. If you do not know what this means, have your ISP change it for you.

LasJas

4:14 pm on May 28, 2004 (gmt 0)

10+ Year Member



Yes this has already been done. It actually looks like this:
<body bgcolor="#f5f5dc" tracingopacity="50" tracingsrc="cgi-bin/FormMail.pl">
<h1 align="center"><u><strong>Application</strong></u></h1>
<FORM method="post" action="/cgi-bin/FormMail.pl">
<input type=hidden name="recipient" value="info@example.com">
<input type=hidden name="subject" value="New Application">
<input type=hidden name="redirect" value="http://www.example.com/thankyou.htm">
<p>&nbsp;</p>

I have already chmod to read and write. Also, changed owner to WWW.

[edited by: Macguru at 4:35 pm (utc) on May 28, 2004]
[edit reason] Next time you post specifics, I bill you ! :) [/edit]

travelin cat

4:24 pm on May 28, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



I would try a forward slash added before cgi-bin, like this:

tracingsrc="/cgi-bin/FormMail.pl"

wee see these 500 errors a lot, 99% of the time they are either caused by how the form was called, as above, or a misconfiguration in the script it self

LasJas

1:22 am on May 31, 2004 (gmt 0)

10+ Year Member



Thank you very much! I am up and running!

LasJas

9:39 pm on Jun 8, 2004 (gmt 0)

10+ Year Member



I spoke to soon!

Okay, now I am having a new problem. After the 'submit' button is pressed it goes to a 'thank you' page but I am not getting the email.

I am hosting the website and I am trying to have it sent to a webmail account. Where could the problem lie. In the formmail? In the HTML code? Or some other place that I am not thinking about?

Please help!