500 Internal Server Error if reCAPTCHA is blank or incorrect

2,350 views
Skip to first unread message

bydesigncreative

unread,
Jun 20, 2011, 4:21:34 PM6/20/11
to reCAPTCHA
Hi all,

I have been going through the archives and have seen a few other
questions similar to this but no answers. Please forgive me if I
missed it somewhere.

I have implemented reCAPTCHA on my site using the FormMail method. I
added the widget to my form, and it displays properly. I edited
FormMail.pl as instructed on the directions.

Everything seems to be working properly as far as sending, as long as
the user enters the correct reCAPTCHA response. However, if they enter
nothing or enter a wrong response and submit the form, instead of
displaying the correct error message it gives a 500 Internal Server
Error:

The server encountered an unexpected condition which prevented it from
fulfilling the request.
The script had an error or it did not produce any output. If there was
an error, you should be able to see it in the error log.

When I check the error log, it says there are no errors. I believe a
couple other people also said that happened with theirs.

I have checked and rechecked the code and do not see any issues. Does
anyone have any suggestions on what to try next?

Also, as a side note, does anyone know whether it is possible to check
for a blank reCAPTCHA field using JavaScript? That is, how would I
name/specify the field? I am not well versed in JavaScript but am
checking the rest of the form using JavaScript and couldn't get it to
work. I tried:

if (formname.recaptcha_challenge_field.value == "")

This may not be an appropriate way to access it.

Let me know if you need me to post code. Thanks so much for your
consideration.

Best regards,
Bethany

Charles Sweeney

unread,
Jun 20, 2011, 5:18:33 PM6/20/11
to reCAPTCHA
On Jun 20, 9:21 pm, bydesigncreative <bydesigncreat...@gmail.com>
wrote:
I don't think the problem is with reCAPTCHA. Most probably how your
script handles errors. Check you haven't made any parse errors with
your error-handling code. Can the author of the script offer you any
advice?
--
Charles Sweeney
http://FormToEmail.com
PHP mail script with reCAPTCHA

bydesigncreative

unread,
Jun 21, 2011, 10:53:03 AM6/21/11
to reCAPTCHA
Charles,

Thanks for your response. I am just using a Matt's Script Archives
version of FormMail.pl. I checked and checked and didn't see anything
wrong with the error handling section, and my web host has a feature
for checking a script to see whether it compiles correctly and it said
there were no errors. But, as I am not completely comfortable with CGI
and Perl I may try switching to the PHP reCAPTCHA module. I'm more
comfortable with PHP but was hoping not to have to redo the entire
form. Oh well.... :)

Thanks again for your assistance.

Regards,
Bethany
> Charles Sweeneyhttp://FormToEmail.com
> PHP mail script with reCAPTCHA- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages