MDLog:/sysadmin

The Journal Of A Linux Sysadmin

Troubles Installing the reCAPTCHA Plugin on phpBB 2.0.22

| Comments

A few days ago I was trying to install the reCAPTCHA plugin for phpBB2 to stop the increasing number of spam registrations on one phpbb forum. I’ve followed the instructions, but the usercp_register.patch was failing:

1
2
3
patching file usercp_register.php
Hunk #2 FAILED at 278.
1 out of 4 hunks FAILED -- saving rejects to file usercp_register.php.rej

The phpbb installation was the latest version available of the 2.0.x stable branch at this time (2.0.22) with no custom changes or modifications done on the core phpbb files. I have even tried to install the reCAPTCHA phpBB MOD that required to install easymod 0.3.0 but that failed also. I could not find any useful information anywhere on the phpBB forums or recaptcha ones.

In the end I had to fix the patch myself and change the following 2 lines in order for it to apply cleanly (basically just removing ‘’, from those lines as they were not present in the default phpbb usercp_register.php file):

1
2
3
4
5
6
7
8
42c42
< -        message_die(GENERAL_ERROR, 'Could not obtain confirmation code', __LINE__, __FILE__, $sql);
---
> -        message_die(GENERAL_ERROR, 'Could not obtain confirmation code', '', __LINE__, __FILE__, $sql);
59c59
< -        message_die(GENERAL_ERROR, 'Could not delete confirmation code', __LINE__, __FILE__, $sql);
---
> -        message_die(GENERAL_ERROR, 'Could not delete confirmation code', '', __LINE__, __FILE__, $sql);

Hopefully this information will help other peoples trying the same thing, at least until recaptcha fixes the patch.

Comments