I moved a client site to my server that has recaptcha set on the Admin login. Unfortunately, it wasn't turned off and I can no longer get in to disable it. Is there any way to disable it outside of the drupal admin?

the recaptcha key is still tied to the live domain, while the moved copy of the site undergoes some edits.

Comments

bacon’s picture

Are you really using Drupal 5?

I think you have two options:

  1. If you have command line access to the site, you can download http://drupal.org/project/drush to disable the module.
    drush disable recaptcha
  2. If you have access to phpmyadmin (or mysqladmin) you can set the status of the recaptcha module to 0 in the system database table.
    UPDATE system SET status = 0 WHERE name = 'recaptcha' LIMIT 1;

fast women, pretty cars, sexy computers
https://coderwall.com/algorgeous/

squidz’s picture

Yeah...I inherited the site currently running 5.3 and have moved it to my server. Since I never used below v6 and have only done one Drupal rig myself, I wasn't sure how easily it could be upgraded without breaking all of the various modules running in the site. The primary goal was to get them moved.

I don't have command line on my server, but I do have phpmyadmin access. So, I'll try that angle. Does that effectively disable the module or just hide it from Drupal? Once I'm back in the admin, will I be able to bring it back online via the module or will I need to go back to change the status in phpmyadmin?

bacon’s picture

That will disable it the same way as if you were to uncheck the module. Don't just run the SQL command, I know it will work for D6, but maybe the table is a little different in D5. But I'm sure you'll be able to look and see what to change.

To change it back, go back and enable the module the same way you usually would.

fast women, pretty cars, sexy computers
https://coderwall.com/algorgeous/

samsterlin’s picture

1) set the "status" column value as 0 for 'google_recaptcha' module in system table
2 remove the "captcha" entry in variable table
3) clear the cache tables.

Nux’s picture

You don't need that second step.

Just run this SQL:

UPDATE `system` SET `status` = '0' WHERE `name` = 'google_recaptcha' LIMIT 1;

And then clear cache. The easiest way to clear cash is to Run update.php.

As you cannot login you will need to set `$update_free_access = TRUE;` in `/sites/default/settings.php`. Do not forget to set this back to FALSE afterwards. See: https://www.drupal.org/docs/7/administering-drupal-7-site/clearing-or-rebuilding-drupals-cache.

Once you have normal access remeber to unistall the module through `/admin/modules/uninstall` page.

markpape’s picture

To disable Captcha:

UPDATE `system` SET `status` = '0' WHERE `name` = 'captcha' LIMIT 1;

To disable reCaptcha (from google):

UPDATE `system` SET `status` = '0' WHERE `name` = 'recaptcha' LIMIT 1;

abhishekvekta’s picture

I've tried running the above query, clearing the entire cache table and have updated the settings.php but the captcha is still there and I'm unable to log in to the website. Drupal 7