Forums

Captcha parse error

bkmacdaddy 02 Feb, 2009
I get the following error message at the top of the form when I enable the Captcha feature:

Parse error: syntax error, unexpected '-', expecting ',' or ';' in /home6/bestdata/public_html/bestroilists/components/com_chronocontact/chronocontact.php(41) : eval()'d code on line 17

I tried searching this forum but couldn't find anything related. Any clues?
GreyHead 02 Feb, 2009
Hi bkmacdaddy,

You probably have a '-' in one of your field names and this isn't an allowed character for some purposes; please replace it with an underscore.

Bob
bkmacdaddy 02 Feb, 2009
Hi Bob,

Thanks for the response.

This is strange. I never got the error message until I enabled the Captcha. Now it's there even when I disable the Captcha.

I went back through the form HTML and found one usage of the '-' and changed it to an underscore, but I still get the same error.

Any other ideas?

Thanks,

Brian
GreyHead 02 Feb, 2009
Hi Brian,

Yes, I dug a bit further - the error is coming from the the code when ChronoForms loads the DB Connection info so maybe it's been carried through into a database record name?

Bob
bkmacdaddy 02 Feb, 2009
Okay, I will check that. It is connected to a DB so hopefully that's it. I'll post back once I can check.

Thanks!
bkmacdaddy 02 Feb, 2009
The DB Record did use the '-' in its name. But I changed it to '_' and still get the same error. Urgh.
GreyHead 02 Feb, 2009
Hi Brian,

Hmmm. Can you check the fields_names list on the AutoGenerated Code tab and see if that has updated - I thought it was re-written when the form was re-saved but maybe not?

Bob
bkmacdaddy 02 Feb, 2009
Yes, it was regenerated with the underscore.

I really appreciate your time and quick response.

I really want to get the Captcha feature working but now it's even more important that I just get the error off the form altogether...
GreyHead 02 Feb, 2009
Hi Brian,

[sendfb][/sendfb]
Bob
bkmacdaddy 02 Feb, 2009
Okay, I just emailed it to you. Hope this will help you solve my mystery... :?
GreyHead 02 Feb, 2009
Hi Brian,

No - it all looks Ok here :-(

If you have no data saved I suggest that you drop the database table and recreate it.

Bob
bkmacdaddy 02 Feb, 2009
Okay, I recreated the table and now the error is gone. However, I tried enabling Captcha again and nothing! I know I have all the necessary requirements (GD, Freetype, PHP 5, etc.)

This is driving me nuts! But at least the error is gone... 🙂

Thanks for the help. Any clues how to get Captcha working?
GreyHead 02 Feb, 2009
Hi Brian,

Have you got {imageverification} in the Form HTML - I think I had to add it??

Bob
bkmacdaddy 02 Feb, 2009
THAT'S IT!!!!

Thank you again and again! Finally got it working and error-free. You saved me some gray hairs, I believe...

Thanks again!

😀
This topic is locked and no more replies can be posted.