I am in the process of setting up a guestbook (using Guestbook module) and i would like to include a captcha with the form that this produces. I have installed the Captcha and Captcha Riddler module and used Form Store to make the Guestbook form available to Captcha. So far so good. But then, problems.
When i set a captcha point (in the settings for the Captcha module) on the Guestbook form by using the dropdown and choosing 'riddler' or 'math', i get a whitescreen with:
Warning: Table 'theflavasumtrust_system' was not locked with LOCK TABLES query: SELECT * FROM theflavasumtrust_system WHERE type = 'theme' in /usr/local/apache/htdocs/includes/database.mysql.inc on line 172
Warning: Table 'theflavasumtrust_watchdog' was not locked with LOCK TABLES query: INSERT INTO theflavasumtrust_watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', 'Duplicate entry 'guestbook_form_entry_form_authenticated_user_cap' for key 1\nquery: INSERT INTO theflavasumtrust_variable (name, value) VALUES ('guestbook_form_entry_form_authenticated_user_captcha', 's:12:\\"captcha/Math\\";') in /usr/local/apache/htdocs/includes/database.mysql.inc on line 172.', 2, '', 'http://www.theflavasumtrust.org/admin/settings/captcha', 'http://www.theflavasumtrust.org/admin/settings/captcha', '82.111.130.24', 1180000919) in /usr/local/apache/htdocs/includes/database.mysql.inc on line 172
...so i hit my back button and go back to the Captcha module settings, which is now headed with these errors:
* user warning: Duplicate entry 'guestbook_form_entry_form_authenticated_user_cap' for key 1 query: INSERT INTO theflavasumtrust_variable (name, value) VALUES ('guestbook_form_entry_form_authenticated_user_captcha', 's:12:\"captcha/Math\";') in /usr/local/apache/htdocs/includes/database.mysql.inc on line 172.
* warning: Cannot modify header information - headers already sent by (output started at /usr/local/apache/htdocs/includes/database.mysql.inc:172) in /usr/local/apache/htdocs/includes/common.inc on line 311.
I am mainly an xhtml/css developer with very limited php skills. Can anyone make sense of the errors i'm getting?
thanks in advance.
Comments
variables table - name field length
I had the same problem come up and i found out that the variables used are too long.
In the variables table the name field has a length of 48 (varchar) and thus the variables are truncated.
I changed that to 70 manually through phpMyAdmin and now the variables don't get truncated anymore and the error in the dialog disappears.
However, when I set the captcha for the guestbook module to Math for anonymous user then just a blank page comes up when i try to access the guestbook... I'm just trying to figure out what is wrong.
Please don't regard this as a definite guide as I'm a novice user of drupal!