Using reCAPTCHA with phpBB2
Stay organized with collections
Save and categorize content based on your preferences.
Important: Version 1.0 of the reCAPTCHA API is no longer supported, please upgrade to Version 2.0. Learn more
The reCAPTCHA phpBB2 plugin uses a CAPTCHA to prevent forum spam.
We recommend that you use the reCAPTCHA phpBB MOD to install reCAPTCHA. There are two mods available, one for registration and one for guest posts.
In addition to the phpBB MOD, there's also a patch to enable reCAPTCHA on registration. To install reCAPTCHA using a
patch, follow these directions:
- Download the zip file and extract.
- Move the file recaptchalib.php to your phpBB includes directory.
- Apply the first patch by running the following command from your phpBB includes directory:
patch -b usercp_register.php < /path/to/usercp_register.patch
- Move the profile_add_body.tpl.patch file to the phpBB templates/<your_theme> directory (by default
<your_theme> is 'subSilver')
- Apply the second patch by running the following command from the phpBB templates/<your_theme> directory:
patch -b profile_add_body.tpl < /path/to/profile_add_body.tpl.patch
- Sign-up for reCAPTCHA keys here. reCAPTCHA will issue you a public and
private key. Open usercp_register.php in your includes directory
and update the $recaptcha_public_key and $recaptcha_private_key with the values you were issued.
- That's it! Your reCAPTCHA widget should now appear on the user registration page.
FAQ
-
What if the patch command fails?
-
The patch was created using unified diff (diff -u). Different versions of this file or other modifications may cause a
conflict. You can study the patch file to see what is being
modified and how this caused a conflict with your file.
-
I want to roll back the patch changes or uninstall reCAPTCHA, how do I do this?
-
When you ran the patch command with the '-b' option, a backup of files was made in the same directory. Use the mv
command to overwrite the patched file with the original. You can also delete
the recaptchalib.php file from your includes directory.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-07-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-07-10 UTC."],[[["\u003cp\u003ereCAPTCHA is a tool that helps prevent forum spam in phpBB2 by using a CAPTCHA.\u003c/p\u003e\n"],["\u003cp\u003eTwo phpBB MODs are available to install reCAPTCHA, specifically for registration and guest posts, which are recommended over patch installation.\u003c/p\u003e\n"],["\u003cp\u003ePatch installation is also an option, involving downloading files, applying patches to specific phpBB files, obtaining reCAPTCHA keys, and updating the usercp_register.php file with these keys.\u003c/p\u003e\n"],["\u003cp\u003eVersion 1.0 of the reCAPTCHA API is no longer supported; users should upgrade to Version 2.0 for continued functionality.\u003c/p\u003e\n"]]],["reCAPTCHA Version 1.0 is deprecated; upgrade to 2.0. The reCAPTCHA phpBB2 plugin, which uses a CAPTCHA, is recommended via phpBB MODs for registration and guest posts. To install via patch, download and extract the zip file, move `recaptchalib.php`, and apply patches to `usercp_register.php` and `profile_add_body.tpl`. Obtain reCAPTCHA keys, and update the keys in `usercp_register.php`. To uninstall, revert to the backup files and delete `recaptchalib.php`.\n"],null,["# Using reCAPTCHA with phpBB2\n\n**Important** : Version 1.0 of the reCAPTCHA API is no longer supported, please upgrade to Version 2.0. [Learn more](/recaptcha/docs/faq)\n\nThe reCAPTCHA phpBB2 plugin uses a [CAPTCHA](http://www.google.com/recaptcha/) to prevent forum spam.\n\nWe recommend that you use the reCAPTCHA phpBB MOD to install reCAPTCHA. There are two mods available, one for [registration](http://www.phpbb.com/community/viewtopic.php?f=16&t=588059) and one for [guest posts](http://www.phpbb.com/community/viewtopic.php?f=16&t=588297).\n\nIn addition to the phpBB MOD, there's also a patch to enable reCAPTCHA on registration. To install reCAPTCHA using a\npatch, follow these directions:\n\n1. [Download](http://code.google.com/p/recaptcha/downloads/list?q=PB2-Latest) the zip file and extract.\n2. Move the file recaptchalib.php to your phpBB includes directory.\n3. Apply the first patch by running the following command from your phpBB includes directory: \n\n ```\n patch -b usercp_register.php \u003c /path/to/usercp_register.patch\n ```\n4. Move the profile_add_body.tpl.patch file to the phpBB templates/\\\u003cyour_theme\\\u003e directory (by default \\\u003cyour_theme\\\u003e is 'subSilver')\n5. Apply the second patch by running the following command from the phpBB templates/\\\u003cyour_theme\\\u003e directory: \n\n ```\n patch -b profile_add_body.tpl \u003c /path/to/profile_add_body.tpl.patch\n ```\n6. Sign-up for reCAPTCHA keys [here](https://www.google.com/recaptcha/admin#createsite). reCAPTCHA will issue you a public and private key. Open usercp_register.php in your includes directory and update the $recaptcha_public_key and $recaptcha_private_key with the values you were issued.\n7. That's it! Your reCAPTCHA widget should now appear on the user registration page.\n\nFAQ\n---\n\n\nWhat if the patch command fails?\n\n: The patch was created using unified diff (diff -u). Different versions of this file or other modifications may cause a\n conflict. You can study the patch file to see what is being\n modified and how this caused a conflict with your file.\n\n\nI want to roll back the patch changes or uninstall reCAPTCHA, how do I do this?\n\n: When you ran the patch command with the '-b' option, a backup of files was made in the same directory. Use the mv\n command to overwrite the patched file with the original. You can also delete\n the recaptchalib.php file from your includes directory."]]