The Captcha on user registration forms is totally broken on my site. Whenever someone tries to sign up for an account in any browser, they receive the message:
Cookies should be enabled in your browser for CAPTCHA validation.
I've tried switching themes, disabling the advertising module (which I've found has caused problems with other things before), and tried disabling all the captchas except the core Captch module. No luck.
Comments
Comment #1
soxofaan commentedWhen you get that message, it means that the CAPTCHA module is not able to use sessions (which require cookies in drupal).
Do you have non standard session settings for your Drupal install?
Do you have a user id 0 in your user table?
Does CAPTCHA work for authenticated (but non admin) users?
Comment #2
radmod commentedThanks for the response soxofan.
There is NOT a user with a uid of 0. My admin user is uid 1.
I don't think there are any non-standard session settings in my Drupal install. Is there something specific you know of that I can check?
The Captcha fails when an anonymous user tries to register (the only place I use a Captcha normally). I enabled it temporarily on the comment form, and it worked for a logged-in user. So it looks like it's just failing for anonymous users.
Does any of that help?
Comment #3
soxofaan commentedThis is the problem.
If you don't have a uid 0 in your users table, anonymous users don't get session based storage, and the CAPTCHA module can't do hist job properly.
If you know how to do this: add a record with uid = 0 to you user tabel, the other fields are not important, you can leave them empty/default.
Any ideas how that record could get lost? Some weird module or a funky upgrade?
Comment #4
radmod commentedMy install was originally Drupal 4.7 and upgraded to 5.x. Maybe its admin user ID starts at 0?
Comment #5
soxofaan commentedSeems unlikely, since UID 0 was always reserved for the anonymous user, as far as I know.
Anyway, could you solve your problem by adding a record with UID 0?
Comment #6
radmod commentedSorry for the delay, it took me a few days before I could try this out, and yes, it fixed the issue. Thanks for you help!
Comment #7
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #8
nchase commentedSame problem here, but there is a user 0. After entering the captach math for 2-3 times the value is accepted and the user is registered.
Comment #9
soxofaan commentedat #8: please be more descriptive.
From your description it even seems you have a different problem as discussed in this thread (if you would get "cookies should be enabled..." errors, you would not be able to get past the user registration form.) Please submit a separate issue for a different problem.
Comment #10
stefan_pn commentedI use Drupal 6.6 I had the same Captcha problem with the cookies. I inserted in user table a line like you said and everything works fine now.
Thanks a lot
Comment #11
andrus_k commentedIndeed, #3 fixes the problem!
Comment #12
artscoop commentedSame issue.
The warning came from the blue.
When browsing as a guest, when I try to create a node, I get this warning.
However, I have *not* upgraded from a previous version of Drupal.
- A user with ID 0 *exists* in the database.
- The captcha is shown *only for guest users*
- I use PathAuto
- The node submit form is *shown in a block* on many pages.
- The locale is not en-US.
- I use Math and Text Captcha (because the Image Captcha does not appear anymore)
I can submit a node as a guest but I have to click the "Save" button twice.
Seems that this bug dit not occur earlier with the same configuration.
Any idea on this ?
Comment #13
janusman commentedAdding User with uid=0 solved it in my case.
Comment #14
irfanzone commentedHI Drupal Administrators,
I am facing the same issue.
I have got Drupal 5.14 installed on Unix Environment and when trying to access the CMS it has started to give the same Cookies Error
(Error: 'Cookies should be enabled in your browser for CAPTCHA validation.')
We have a user id=0 enabled in the User Table and cookies are enabled in all the browsers
Any help would be highly appreciated.
Thanks in advance for the support
Comment #15
soxofaan commentedat irfanzone: What kind of other modules do you have installed? Are there for example modules (or server settings) that interact/change PHP sessions?
Comment #16
kakajoe commentedhow to enable uid=0 ?? cause i got the same problem...some users of my website can't register ... im using D6
Comment #17
soxofaan commentedNormally uid=0 is available by default in Drupal, so you don't have to enable anything. However, in some situations (for example moving a site with a MySQL dump and import) it's possible that uid=0 is lost. If that is the case: you should add an entry for this uid back to the users table in the database:
* go to your database, hosting providers typically provide an interface like phpMyAdmin
* go to the table "users"
* check if there is an entry for uid=0, if not add an entry with uid=0 (the other fields of the entry are not important, you can leave the defaults)
If only some users can't register (and some others still can), you don't have a problem with uid=0.
When you don't have an uid=0 entry, no user whatsoever will be able to register.
Comment #18
soxofaan commentedtagging
Comment #19
mikki2 commentedI had a similar problem and correcting the $cookie_domain path in sites/all/default/settings.php fixed the problem. I had a wrong path set.
Comment #20
soxofaan commentedClosing old/outdated issues for 5.x releases, which is officially unsupported now.
If this issue still exists for Drupal6 or Drupal7, please reopen (and update the version)
Comment #21
Kalla Santhoshi Kumari commentedaadhaar update by using new mobile number how it will possible when captcha will removes from portal