View Full Version : Anti-Spam Options - reCAPTCHA v2 Human Verification
woodmj
10-20-2017, 07:35 AM
I got the mail this morning too.
I thought this mod used v2 :-?
IggyP
10-20-2017, 12:08 PM
its perhaps on the captcha acct side? i havent heard about any mails yet here but there may be one...
just thinking, i thought there was a place on the captcha side to set what key to use/per site designations etc....which i dont know offhand if this mod ignores or not...is it possible its set on captcha1 key on the captcha acct but still working as captcha2 due to the mod?
MarkFL
10-20-2017, 12:50 PM
In my case, I had previously chosen v2 as my account type with google, but had selected v1 in my vB settings. Then last night, I installed this product, and now I have v2 selected and now the registration form has the "I'm not a robot" box instead of the old verification involving images with text to be typed into an input field.
djbaxter
10-22-2017, 10:34 PM
The add-on version is version 1.
It uses reCaptcha v2. You need to have valid entries in:
New reCAPTCHA Site Key
Site key provided to you by reCAPTCHA.
New reCAPTCHA Secret Key
Secret key provided to you by reCAPTCHA.
In the Human Verification options it's listed only as "New reCAPTCHA".
You can test it using:
New reCAPTCHA Verification
New and improved version of reCAPTCHA
Click here to test connection
Rob Graves
10-23-2017, 06:21 PM
I am receiving this error when I Enable the V2 code:
Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /home4/r6d6i9q5/public_html/forum/includes/class_humanverify_new_recaptcha.php
#0 /home4/r6d6i9q5/public_html/forum/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 /home4/r6d6i9q5/public_html/forum/register.php(1244): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}
Fatal User Error: Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in ..../includes/class_humanverify_new_recaptcha.php in ..../vb/vb.php on line 286
Anyone have any ideas? I am using the Image verification for the moment, but would like to get Recaptcha back.
Thanks in advance!
The connection test turns out positive...
twitch
10-24-2017, 12:23 AM
Does this work on 4.2.5? Is this the best option for human verification and to stop spambots?
MarkFL
10-24-2017, 12:26 AM
Does this work on 4.2.5?...
Yes, and if you're using PHP 7.x you'll need to apply the edit found in the last pages of this discussion. :)
djbaxter
10-24-2017, 01:56 AM
vBulletin 4.2.5
Edits for PHP 7.x applied
Just had a message from a forum member who forgot his password. He said that
the forgot password and contact us links give this error message:
"Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /home/psychlin/public_html/forum/includes/class_humanverify_new_recaptcha.php
#0 /path/to/forum/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 //path/to/forum/login.php(197): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}"
Any suggestions? Testing the connection via the ACP checks out fine and I am using the correct reCaptcha V2 keys.
MarkFL
10-24-2017, 02:12 AM
vBulletin 4.2.5
Edits for PHP 7.x applied
Just had a message from a forum member who forgot his password. He said that
Any suggestions? Testing the connection via the ACP checks out fine and I am using the correct reCaptcha V2 keys.
I just tested that out on my site, and it worked fine. Are you sure you made the correct PHP 7.x edit to line 14 of "includes/class_humanverify_new_recaptcha.php?"
djbaxter
10-24-2017, 02:43 AM
Yes:
function vB_HumanVerify_New_Recaptcha(&$registry)
{
// parent::vB_HumanVerify_Abstract($registry);
parent::__construct($registry);
}
MarkFL
10-24-2017, 02:51 AM
At the risk of sounding like I am asking you if the appliance that doesn't work is plugged in, are you sure this edit exists in the copy on your server? :)
djbaxter
10-24-2017, 02:56 AM
It does. I just tried to reproduce it by logging out and using the Contact Us form. I don't get that error.
Going to test the forgot password form now.
djbaxter
10-24-2017, 03:01 AM
It works fine for me. I don't know how he got those errors but I can't reproduce them. Very odd.
To be fair, I did re-upload class_humanverify_new_recaptcha.php before testing. It's possible the version on the server was corrupted or contained an error.
In any case, I can confirm that it's working fine now.
twitch
10-24-2017, 12:20 PM
Looks like it is working good with the fix for line 14. Is it possible to force reCAPTCHA and question/answer at the same time?
franzes80
10-24-2017, 04:53 PM
Updated with fix of line 14. To work well you have to uninstall the old version and put that new.works on vbulletin 4.2.5 :)
Flipfloptrader
10-27-2017, 11:28 AM
Hi all,
I was wondering if anyone found the fix to the deprecated error on line 8? My error log is just full of the same line and would be nice to get rid of it.
Using 4.2.5 and PHP 7.1.
CharlieDelta
12-21-2017, 03:49 PM
I am receiving this error when I try to test registration on my forum.
Fatal User Error: Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in ..../includes/class_humanverify_new_recaptcha.php in ..../vb/vb.php on line 286
Any thoughts on how to rectify?
CharlieDelta
12-21-2017, 03:50 PM
Oops. Nevermind I just noticed a fix above.
Will try that.
w11cekd
12-29-2017, 08:21 AM
I get this error when i register.
Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /var/www/vbforum/includes/class_humanverify_new_recaptcha.php
#0 /var/www/vbforum/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 /var/www/vbforum/register.php(1244): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}
djbaxter
12-29-2017, 02:48 PM
Fix already posted at https://vborg.vbsupport.ru/showpost.php?p=2586632&postcount=217 and https://vborg.vbsupport.ru/showpost.php?p=2586632
EDIT /includes/class_humanverify_new_recaptcha.php
On line 14, FIND:
parent::vB_HumanVerify_Abstract($registry);
REPLACE with:
parent::__construct($registry);
pettravel
01-07-2018, 01:08 PM
There is only a php file in the Includes folder, no XML file. I uploaded the php file to the Includes folder of the forum but (obviously) cannot import it using the Product Manger because it is looking for an XML file. The other file included in the download is version 1. Does anyone have the XML file that should have been included in the download for Recaptcha Version 2? Would really appreciate it.
MarkFL
01-07-2018, 01:18 PM
The .XML file is in the download, and should be with the files you unzipped. :)
pettravel
01-07-2018, 02:04 PM
HI Mark - there is an XML file in the download: product-kh99_new_receptcha_v1_0.xml but don't believe that is the correct version. That said, for some unknown reason, the new recaptcha showed up in the Human Verification Manager and I have configured it and tested it and all looks good. It does not show as version 2 but the keys that Google provided are for this version. Fingers crossed. Appreciate the quick response.
MarkFL
01-07-2018, 02:10 PM
I imported the .XML when installing this product...I don't know what issues, if any, you may encounter by not doing so. There are 4 plugins in the .XML file. :)
TheLordACS
02-24-2018, 08:49 PM
Hello,
I searched in entire topic but i can't found a fix for this:
"[ PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_HumanVerify_New_Recaptcha has a deprecated constructor in includes/class_humanverify_new_recaptcha.php on line 8
"
How can if ix this error?
djbaxter
02-24-2018, 09:34 PM
Hello,
I searched in entire topic but i can't found a fix for this:
"[ PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; vB_HumanVerify_New_Recaptcha has a deprecated constructor in includes/class_humanverify_new_recaptcha.php on line 8
"
How can if ix this error?
See https://vborg.vbsupport.ru/showpost.php?p=2586632&postcount=217
EDIT FILE /includes/class_humanverify_new_recaptcha.php
On line 14 REPLACE
parent::vB_HumanVerify_Abstract($registry);
with
parent::__construct($registry);
Flipfloptrader
02-26-2018, 10:38 AM
See https://vborg.vbsupport.ru/showpost.php?p=2586632&postcount=217
EDIT FILE /includes/class_humanverify_new_recaptcha.php
On line 14 REPLACE
parent::vB_HumanVerify_Abstract($registry);
with
parent::__construct($registry);
That doesn't fix the error that keeps occuring in the error log.
This is line 8:
class vB_HumanVerify_New_Recaptcha extends vB_HumanVerify_Abstract
I've tried to search for the fix but no joy.
djbaxter
02-27-2018, 05:19 PM
That doesn't fix the error that keeps occuring in the error log.
This is line 8:
class vB_HumanVerify_New_Recaptcha extends vB_HumanVerify_Abstract
I've tried to search for the fix but no joy.
That line is just declaring the class.
Try fixing line 14 as shown above and then make sure you reupload the class_humanverify_new_recaptcha.php to the correct location:
/includes/class_humanverify_new_recaptcha.php
If you still have a problem, reinstall the product using the XML file:
product-kh99_new_recaptcha_v1_0.xml
Also, what you are seeing is just a deprecation warning, not an error. That doesn't affect current use of the product. To suppress such warnings, add this to your /includes/config.php right under the <?php line at the very top:
define('SKIP_ALL_ERRORS', true);
define('SKIP_DS_ERRORS', true);
Then reupload config.php back to /includes/config.php
Nassou
03-12-2018, 03:25 PM
Please note that Curl MUST BE INSTALLED AND ENABLED in your server otherwise it won't work.
omtre.co.uk
03-13-2018, 07:26 PM
Hi,
I'm getting a fatal error on registration. It's saying:
Fatal error: Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() in /home/neregion/public_html/board/includes/class_humanverify_new_recaptcha.php on line 14
Any ideas?
djbaxter
03-13-2018, 09:35 PM
Yep. See https://vborg.vbsupport.ru/showpost.php?p=2593114&postcount=278
MaiThamDobais
03-20-2018, 02:31 PM
how i can make it right to left compatible?
because all of my forum is from right to left
and this repcatcha is the only thing that is on the left
BasilFawlty
03-20-2018, 04:14 PM
On line 14 replace:
parent::vB_HumanVerify_Abstract($registry);
with:
parent::__construct($registry);
That's it. :)
Woo hoo! I just installed the mod with my new upgrade to VB4.2.5 and had the white page of death. This fixed it. All seems to be working as it should now (so far).
(Marked as installed)
ifmefector
03-21-2018, 02:03 PM
Just want to say, I installed this today on version 4.25
I had to do this change
On line 14 replace:
parent::vB_HumanVerify_Abstract($registry);
with:
parent::__construct($registry);
That's it. :)
and everything is working fine.
Thank You for a nice mod!
XotelHotel
04-03-2018, 12:50 PM
okay with this new recapthca i getting a white screen help me please it all works i tested the connnection and it works fine just showing the white page
Zelda-King
04-05-2018, 11:43 AM
Yeah just installed this on 4.2.5. The "test connection" works but if I try to register a new account I get:
Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /forumpath/class_humanverify_new_recaptcha.php
#0 /forum path/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 /forum path/register.php(1244): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}The fix posted in post 286 sorted it.
Chrismk
04-11-2018, 09:34 AM
Installed successfully into 4.2.5.
Had to apply fix in post 286.
Thank you for providing this - much appreciated!
mightypilot
04-17-2018, 01:43 PM
I'm new to vBulletin so bear with me. This recaptcha v2 mod is the first one I've added to my 4.2.5 site. And it worked perfectly. Thank you to those responsible. I'm looking forward to more additions..
--------------
Yesterday: I installed the mod and proclaimed it worked! But I had not tested it yet. When the time came for the new user screen to come up, all I got was a blank white screen. I uninstalled the mod and was going to post a comment about it here, but...
Today: I saw Ifmefector's fix at post #286. I decided to try the fix by first changing the code in the file and then re-uploading the files. This time around the recaptcha worked. Thank you Ifmefector for your post.
It's be interesting to know how the Recaptcha V2 works. If the info was public then hackers would better know a way to get around it maybe?
randytnguyen7
04-18-2018, 04:12 PM
Image verification could not be verified due to server issues. Please try again later.
What does it mean?
Stratis
04-19-2018, 09:31 AM
Image verification could not be verified due to server issues. Please try again later.
What does it mean?
Except the fix above, do you have "curl" option on your server?
randytnguyen7
04-19-2018, 06:12 PM
Except the fix above, do you have "curl" option on your server?
I already fix the curl in php.ini but still showing that message
Stratis
04-20-2018, 09:23 AM
I already fix the curl in php.ini but still showing that message
Did you see the log file in you server, maybe firewall do not let run the script.?
So you need to exempt that error.
Rawbeen
05-23-2018, 10:49 AM
Recaptcha V2 not showing on mobile (IOS)
Hello Everyone !
Quite a Hot topic lately, thanks to kh99 for the good work :)
I just made a fresh install of VB 4.2.5, installed the Recaptacha V2 Mod, Changed the line 14bug and it works well !
Except on mobile phone, for some reason the Recaptcha V2 Widget is not showing.. but if I try to register, I got the warning, "You didn't pass human Verification" so the thing is working, just not showing...
Tried to play around with CSS, but can't get to make it display for
Anyone gets the same issue ? (Safari, or Firefox for iOS tested, same bug, Widget not showing)
http://new.ateliersge.fr/register.php
try it on an actual iPhone to recreate the bug... because when testing on Safari or Firefox the Developper tool "View Adaptive or responsive version" the recaptcha should in the register from...
Rawbeen
05-23-2018, 11:32 AM
After a few tests, it seems it could be due to the IOS Version of my iPhone X, currently IOS 11.2.5 causing not to show the widget on mobile...
BUT : it works well on iphone 6 with iOS 11.3 and IOS 11.2.1 and also on iPad IOS 11.4 (beta)
does anyone confirms ?
many thanks
rory2000
06-01-2018, 10:52 AM
Hi,
Is it possible to get this MOD updated for 4.2.5 so it works without any changes / and works in the Invisible reCAPTCHA mode as well as the V2 update ?
The Invisible reCAPTCHA will work better at stopping these spammers.
Thanks in advance.
GeneralLife
06-04-2018, 02:09 AM
Im getting an error here
Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /var/www/vhosts/redacted/redacted/includes/class_humanverify_new_recaptcha.php
#0 /var/www/vhosts/redacted/redacted/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 /var/www/vhosts/redacted/redacted/register.php(1244): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}
djbaxter
06-04-2018, 07:09 AM
See https://vborg.vbsupport.ru/showpost.php?p=2586632&postcount=217 and https://vborg.vbsupport.ru/showpost.php?p=2586632
EDIT /includes/class_humanverify_new_recaptcha.php
On line 14 replace:
parent::vB_HumanVerify_Abstract($registry);
with:
parent::__construct($registry);
extremeseo
06-05-2018, 02:23 AM
This mod support reCAPTCHA v3 ?
djbaxter
06-05-2018, 04:14 AM
No. Hence the title, "reCAPTCHA v2 Human Verification".
Master Of Unive
06-08-2018, 07:11 AM
This mod support reCAPTCHA v3 ?
Recaptcha v3 is not simply a captcha, it is like a score system for each request so it is more complicated.
Areku
06-29-2018, 07:21 AM
I have this installed but I'm still having spammers posting crap as "bots".... I wonder if recaptcha v2 is dead end?
yeahoo
07-07-2018, 03:39 PM
Installed successfully into 4.2.5.
Had to apply fix in post 286.
Me too ......thanks all !
Areku
07-09-2018, 05:34 AM
What does the fix fix?
djbaxter
07-09-2018, 07:11 AM
What does the fix fix?
Compatibility with vBulletin 4.2.5 and PHP 7
Areku
07-09-2018, 07:16 AM
Compatibility with vBulletin 4.2.5 and PHP 7
Yes but am I supposed to see any warning or error message? I'm running 425 and PHP7 but cant remember seeing anything wrong?
djbaxter
07-09-2018, 11:10 AM
Anyone trying to register will see error messages. If you are running 4.2.5 and PHP7 and you want to allow new registrations, apply the fix.
This is assuming you are using reCaptcha:
First check at AdminCP >> Settings >> Human Verification Options
Are you using New reCaptcha?
Then check AdminCP >> Settings >> Options >> Human Verification Options
Which boxes are checked there?
If you are using New reCaptcha, then any of the selected options will have problems and throw errors (assuming you haven't turned all errors off - if you have, you may not get an error but you still won't be able to complete those actions.
class_humanverify_new_recaptcha.php - Fixxed
<?php
if (!isset($GLOBALS['vbulletin']->db))
{
exit;
}
require_once(DIR . '/includes/class_vurl.php');
class vB_HumanVerify_New_Recaptcha extends vB_HumanVerify_Abstract
{
public static $verify_url = 'https://www.google.com/recaptcha/api/siteverify';
/**
* Constructor
*
* @return void
*/
function __construct(&$registry)
{
parent::__construct($registry);
}
private static function get_error_phrase($result)
{
if (isset($result['error-codes']))
$errormsg = current($result['error-codes']);
else
$errormsg = '';
switch ($errormsg)
{
case 'missing-input-secret':
case 'invalid-input-secret':
$error = 'humanverify_new_recaptcha_secret';
break;
case 'missing-input-response':
$error = 'humanverify_new_recaptcha_noanswer';
break;
case 'invalid-input-response':
default:
$error = 'humanverify_new_recaptcha_wronganswer';
}
return $error;
}
function verify_token($input)
{
$this->registry->input->clean_array_gpc('p', array(
'g-recaptcha-response' => TYPE_STR,
));
if ($this->delete_token($input['hash']) AND isset($this->registry->GPC['g-recaptcha-response']) AND
$this->registry->GPC['g-recaptcha-response'] !== '')
{
$secret = urlencode($this->registry->options['hv_new_recaptcha_privatekey']);
$remoteip = urlencode(IPADDRESS);
$response = urlencode($this->registry->GPC['g-recaptcha-response']);
$vurl = new vB_vURL($this->registry);
$vurl->set_option(VURL_URL, self::$verify_url."?secret=$secret&remoteip=$remoteip&response=$response");
$vurl->set_option(VURL_USERAGENT, 'vBulletin ' . FILE_VERSION);
$vurl->set_option(VURL_RETURNTRANSFER, 1);
$vurl->set_option(VURL_CLOSECONNECTION, 1);
if (($result = $vurl->exec()) === false || ($result = json_decode($result, true)) === NULL)
{
$this->error = 'humanverify_new_recaptcha_unreachable';
return false;
}
else
{
if ($result['success'] === true)
{
return true;
}
$this->error = self::get_error_phrase($result);
return false;
}
}
else
{
$this->error = 'humanverify_new_recaptcha_wronganswer';
return false;
}
}
function output_token($var_prefix = 'humanverify')
{
global $vbphrase, $show;
$vbulletin =& $this->registry;
$humanverify = $this->generate_token();
$humanverify['publickey'] = ($this->registry->options['hv_new_recaptcha_publickey'] ? $this->registry->options['hv_new_recaptcha_publickey'] : '');
$humanverify['theme'] = $this->registry->options['hv_new_recaptcha_theme'];
$humanverify['type'] = $this->registry->options['hv_new_recaptcha_type'];
if (preg_match('#^([a-z]{2})-?#i', vB_Template_Runtime::fetchStyleVar('languagecode') , $matches))
{
$humanverify['hl'] = strtolower($matches[1]);
}
$templater = vB_Template::create('humanverify_new_recaptcha');
$templater->register('humanverify', $humanverify);
$templater->register('var_prefix', $var_prefix);
$output = $templater->render();
return $output;
}
function fetch_answer()
{
return '';
}
public static function test_check_config()
{
global $vbulletin;
$output = array();
if (!is_string($vbulletin->options['hv_new_recaptcha_publickey']) || $vbulletin->options['hv_new_recaptcha_publickey']=='')
$output[] = array(1, 'Site key is not set.');
else
$output[] = array(0, 'Site key is set: '.$vbulletin->options['hv_new_recaptcha_publickey']);
if (!is_string($vbulletin->options['hv_new_recaptcha_privatekey']) || $vbulletin->options['hv_new_recaptcha_privatekey']=='')
$output[] = array(1, 'Secret key is not set.');
else
$output[] = array(0, 'Secret key is set: '.$vbulletin->options['hv_new_recaptcha_privatekey']);
if (!function_exists('curl_init'))
$output[] = array(1, 'cURL must be enabled, and any curl_ functions must be removed from disable_functions in php.ini');
else
{
$output[] = array(0, 'cURL is enabled');
$curlinfo = curl_version();
if (empty($curlinfo['ssl_version']))
$output[] = array(1, 'cURL does not have ssl enabled');
else
{
$o = array("cURL version info:");
foreach ($curlinfo AS $key=>$value)
{
if ($key == 'features')
$value = '0x'.dechex($value);
if ($key == 'protocols')
$value = implode(', ',$value);
$o[] = $key.': '.$value;
}
$output[] = array(0, $o);
}
if (($ch = curl_init()) === false)
$output[] = array(1, 'curl_init failed');
else
curl_close($ch);
if (!function_exists('curl_exec'))
$output[] = array(1, 'Function curl_exec is disabled. curl_exec must be removed from disable_functions in php.ini.');
else
$output[] = array(0, 'curl_exec function is not disabled');
}
return $output;
}
public static function test_display_widget()
{
global $vbulletin;
return '<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div class="g-recaptcha" data-sitekey="'.$vbulletin->options['hv_new_recaptcha_publickey'].'"></div>';
}
public static function test_verify()
{
global $vbulletin, $vbphrase;
$output = array();
$vbulletin->input->clean_array_gpc('p', array(
'g-recaptcha-response' => TYPE_STR,
));
if (!isset($vbulletin->GPC['g-recaptcha-response']) || $vbulletin->GPC['g-recaptcha-response'] == '')
$output[] = array(1, 'g-recaptcha-response is not set. Complete the human verification challenge before pressing Submit.');
else
{
$output[] = array(0, 'g-recaptcha-response: ' . fetch_trimmed_title($vbulletin->GPC['g-recaptcha-response'], 50));
$secret = urlencode($vbulletin->options['hv_new_recaptcha_privatekey']);
$remoteip = urlencode(IPADDRESS);
$response = urlencode($vbulletin->GPC['g-recaptcha-response']);
$url = self::$verify_url."?secret=$secret&remoteip=$remoteip&response=$response";
$output[] = array(0, "verify url: '".fetch_trimmed_title($url,160)."'");
if (($ch = curl_init()) !== false)
{
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
if ($result === false AND curl_errno($ch) == '60')
{
$output[] = array(0, "Error 60, retrying with CAINFO");
curl_setopt($ch, CURLOPT_CAINFO, DIR . '/includes/paymentapi/ca-bundle.crt');
$result = curl_exec($ch);
}
$info = curl_getinfo($ch);
if ($result === false)
$output[] = array(1, "curl_exec returned false: ".curl_error($ch));
else
{
if ($info['http_code'] != 200)
$output[] = array(1, "Http response code " . $info['http_code']);
$o = array("cURL transfer info:");
foreach ($info AS $key=>$value)
{
$o[] = $key.': '.$value;
}
$output[] = array($info['http_code'] != 200, $o);
if ($info['http_code'] == 200)
{
$output[] = array(0, "Raw response: ".htmlspecialchars($result));
if (($result = json_decode($result, true)) === NULL)
$output[] = array(1, "json_decode of response failed");
else
{
$o = array("Decoded response:");
foreach ($result AS $key=>$value)
{
if ($key == 'success')
$value = ($value ? 'true' : 'false');
if ($key == 'error-codes')
$value = implode(',', $value);
$o[] = $key.': '.$value;
}
$output[] = array($result['success'] ? 0 : 1, $o);
if ($result['success'] !== true)
{
$error = self::get_error_phrase($result);
require_once(DIR.'/includes/functions_misc.php');
$output[] = array(1, "Error Phrase: ".fetch_phrase($error, 'error'));
}
}
}
else
$output[] = array(1, "Http Response: ".htmlspecialchars($result));
}
curl_close($ch);
}
else
$output[] = array(1, "curl_init() failed.");
}
return $output;
}
}
?>
vBulletin updated the __constructor
aminp30
08-14-2018, 03:13 PM
class_humanverify_new_recaptcha.php - Fixxed
<?php
if (!isset($GLOBALS['vbulletin']->db))
{
exit;
}
require_once(DIR . '/includes/class_vurl.php');
class vB_HumanVerify_New_Recaptcha extends vB_HumanVerify_Abstract
{
public static $verify_url = 'https://www.google.com/recaptcha/api/siteverify';
/**
* Constructor
*
* @return void
*/
function __construct(&$registry)
{
parent::__construct($registry);
}
private static function get_error_phrase($result)
{
if (isset($result['error-codes']))
$errormsg = current($result['error-codes']);
else
$errormsg = '';
switch ($errormsg)
{
case 'missing-input-secret':
case 'invalid-input-secret':
$error = 'humanverify_new_recaptcha_secret';
break;
case 'missing-input-response':
$error = 'humanverify_new_recaptcha_noanswer';
break;
case 'invalid-input-response':
default:
$error = 'humanverify_new_recaptcha_wronganswer';
}
return $error;
}
function verify_token($input)
{
$this->registry->input->clean_array_gpc('p', array(
'g-recaptcha-response' => TYPE_STR,
));
if ($this->delete_token($input['hash']) AND isset($this->registry->GPC['g-recaptcha-response']) AND
$this->registry->GPC['g-recaptcha-response'] !== '')
{
$secret = urlencode($this->registry->options['hv_new_recaptcha_privatekey']);
$remoteip = urlencode(IPADDRESS);
$response = urlencode($this->registry->GPC['g-recaptcha-response']);
$vurl = new vB_vURL($this->registry);
$vurl->set_option(VURL_URL, self::$verify_url."?secret=$secret&remoteip=$remoteip&response=$response");
$vurl->set_option(VURL_USERAGENT, 'vBulletin ' . FILE_VERSION);
$vurl->set_option(VURL_RETURNTRANSFER, 1);
$vurl->set_option(VURL_CLOSECONNECTION, 1);
if (($result = $vurl->exec()) === false || ($result = json_decode($result, true)) === NULL)
{
$this->error = 'humanverify_new_recaptcha_unreachable';
return false;
}
else
{
if ($result['success'] === true)
{
return true;
}
$this->error = self::get_error_phrase($result);
return false;
}
}
else
{
$this->error = 'humanverify_new_recaptcha_wronganswer';
return false;
}
}
function output_token($var_prefix = 'humanverify')
{
global $vbphrase, $show;
$vbulletin =& $this->registry;
$humanverify = $this->generate_token();
$humanverify['publickey'] = ($this->registry->options['hv_new_recaptcha_publickey'] ? $this->registry->options['hv_new_recaptcha_publickey'] : '');
$humanverify['theme'] = $this->registry->options['hv_new_recaptcha_theme'];
$humanverify['type'] = $this->registry->options['hv_new_recaptcha_type'];
if (preg_match('#^([a-z]{2})-?#i', vB_Template_Runtime::fetchStyleVar('languagecode') , $matches))
{
$humanverify['hl'] = strtolower($matches[1]);
}
$templater = vB_Template::create('humanverify_new_recaptcha');
$templater->register('humanverify', $humanverify);
$templater->register('var_prefix', $var_prefix);
$output = $templater->render();
return $output;
}
function fetch_answer()
{
return '';
}
public static function test_check_config()
{
global $vbulletin;
$output = array();
if (!is_string($vbulletin->options['hv_new_recaptcha_publickey']) || $vbulletin->options['hv_new_recaptcha_publickey']=='')
$output[] = array(1, 'Site key is not set.');
else
$output[] = array(0, 'Site key is set: '.$vbulletin->options['hv_new_recaptcha_publickey']);
if (!is_string($vbulletin->options['hv_new_recaptcha_privatekey']) || $vbulletin->options['hv_new_recaptcha_privatekey']=='')
$output[] = array(1, 'Secret key is not set.');
else
$output[] = array(0, 'Secret key is set: '.$vbulletin->options['hv_new_recaptcha_privatekey']);
if (!function_exists('curl_init'))
$output[] = array(1, 'cURL must be enabled, and any curl_ functions must be removed from disable_functions in php.ini');
else
{
$output[] = array(0, 'cURL is enabled');
$curlinfo = curl_version();
if (empty($curlinfo['ssl_version']))
$output[] = array(1, 'cURL does not have ssl enabled');
else
{
$o = array("cURL version info:");
foreach ($curlinfo AS $key=>$value)
{
if ($key == 'features')
$value = '0x'.dechex($value);
if ($key == 'protocols')
$value = implode(', ',$value);
$o[] = $key.': '.$value;
}
$output[] = array(0, $o);
}
if (($ch = curl_init()) === false)
$output[] = array(1, 'curl_init failed');
else
curl_close($ch);
if (!function_exists('curl_exec'))
$output[] = array(1, 'Function curl_exec is disabled. curl_exec must be removed from disable_functions in php.ini.');
else
$output[] = array(0, 'curl_exec function is not disabled');
}
return $output;
}
public static function test_display_widget()
{
global $vbulletin;
return '<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div class="g-recaptcha" data-sitekey="'.$vbulletin->options['hv_new_recaptcha_publickey'].'"></div>';
}
public static function test_verify()
{
global $vbulletin, $vbphrase;
$output = array();
$vbulletin->input->clean_array_gpc('p', array(
'g-recaptcha-response' => TYPE_STR,
));
if (!isset($vbulletin->GPC['g-recaptcha-response']) || $vbulletin->GPC['g-recaptcha-response'] == '')
$output[] = array(1, 'g-recaptcha-response is not set. Complete the human verification challenge before pressing Submit.');
else
{
$output[] = array(0, 'g-recaptcha-response: ' . fetch_trimmed_title($vbulletin->GPC['g-recaptcha-response'], 50));
$secret = urlencode($vbulletin->options['hv_new_recaptcha_privatekey']);
$remoteip = urlencode(IPADDRESS);
$response = urlencode($vbulletin->GPC['g-recaptcha-response']);
$url = self::$verify_url."?secret=$secret&remoteip=$remoteip&response=$response";
$output[] = array(0, "verify url: '".fetch_trimmed_title($url,160)."'");
if (($ch = curl_init()) !== false)
{
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
if ($result === false AND curl_errno($ch) == '60')
{
$output[] = array(0, "Error 60, retrying with CAINFO");
curl_setopt($ch, CURLOPT_CAINFO, DIR . '/includes/paymentapi/ca-bundle.crt');
$result = curl_exec($ch);
}
$info = curl_getinfo($ch);
if ($result === false)
$output[] = array(1, "curl_exec returned false: ".curl_error($ch));
else
{
if ($info['http_code'] != 200)
$output[] = array(1, "Http response code " . $info['http_code']);
$o = array("cURL transfer info:");
foreach ($info AS $key=>$value)
{
$o[] = $key.': '.$value;
}
$output[] = array($info['http_code'] != 200, $o);
if ($info['http_code'] == 200)
{
$output[] = array(0, "Raw response: ".htmlspecialchars($result));
if (($result = json_decode($result, true)) === NULL)
$output[] = array(1, "json_decode of response failed");
else
{
$o = array("Decoded response:");
foreach ($result AS $key=>$value)
{
if ($key == 'success')
$value = ($value ? 'true' : 'false');
if ($key == 'error-codes')
$value = implode(',', $value);
$o[] = $key.': '.$value;
}
$output[] = array($result['success'] ? 0 : 1, $o);
if ($result['success'] !== true)
{
$error = self::get_error_phrase($result);
require_once(DIR.'/includes/functions_misc.php');
$output[] = array(1, "Error Phrase: ".fetch_phrase($error, 'error'));
}
}
}
else
$output[] = array(1, "Http Response: ".htmlspecialchars($result));
}
curl_close($ch);
}
else
$output[] = array(1, "curl_init() failed.");
}
return $output;
}
}
?>
vBulletin updated the __constructor
thank you.I had issue on line 8. your code fixed it :up:
JakeyBoyo
08-16-2018, 08:20 PM
When pressing register getting the follow error
Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /home/uniquega/public_html/forum/includes/class_humanverify_new_recaptcha.php
#0 /home/uniquega/public_html/forum/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 /home/uniquega/public_html/forum/register.php(1244): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}
Any help appreciated
Master Of Unive
08-17-2018, 02:19 AM
When pressing register getting the follow error
Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14 in /home/uniquega/public_html/forum/includes/class_humanverify_new_recaptcha.php
#0 /home/uniquega/public_html/forum/includes/class_humanverify.php(61): vB_HumanVerify_New_Recaptcha->vB_HumanVerify_New_Recaptcha(Object(vB_Registry))
#1 /home/uniquega/public_html/forum/register.php(1244): vB_HumanVerify::fetch_library(Object(vB_Registry))
#2 {main}
Any help appreciated
Fixes are in posts above.
rodriiverduguez
08-30-2018, 03:39 AM
class_humanverify_new_recaptcha.php - Fixxed
<?php
if (!isset($GLOBALS['vbulletin']->db))
{
exit;
}
require_once(DIR . '/includes/class_vurl.php');
class vB_HumanVerify_New_Recaptcha extends vB_HumanVerify_Abstract
{
public static $verify_url = 'https://www.google.com/recaptcha/api/siteverify';
/**
* Constructor
*
* @return void
*/
function __construct(&$registry)
{
parent::__construct($registry);
}
private static function get_error_phrase($result)
{
if (isset($result['error-codes']))
$errormsg = current($result['error-codes']);
else
$errormsg = '';
switch ($errormsg)
{
case 'missing-input-secret':
case 'invalid-input-secret':
$error = 'humanverify_new_recaptcha_secret';
break;
case 'missing-input-response':
$error = 'humanverify_new_recaptcha_noanswer';
break;
case 'invalid-input-response':
default:
$error = 'humanverify_new_recaptcha_wronganswer';
}
return $error;
}
function verify_token($input)
{
$this->registry->input->clean_array_gpc('p', array(
'g-recaptcha-response' => TYPE_STR,
));
if ($this->delete_token($input['hash']) AND isset($this->registry->GPC['g-recaptcha-response']) AND
$this->registry->GPC['g-recaptcha-response'] !== '')
{
$secret = urlencode($this->registry->options['hv_new_recaptcha_privatekey']);
$remoteip = urlencode(IPADDRESS);
$response = urlencode($this->registry->GPC['g-recaptcha-response']);
$vurl = new vB_vURL($this->registry);
$vurl->set_option(VURL_URL, self::$verify_url."?secret=$secret&remoteip=$remoteip&response=$response");
$vurl->set_option(VURL_USERAGENT, 'vBulletin ' . FILE_VERSION);
$vurl->set_option(VURL_RETURNTRANSFER, 1);
$vurl->set_option(VURL_CLOSECONNECTION, 1);
if (($result = $vurl->exec()) === false || ($result = json_decode($result, true)) === NULL)
{
$this->error = 'humanverify_new_recaptcha_unreachable';
return false;
}
else
{
if ($result['success'] === true)
{
return true;
}
$this->error = self::get_error_phrase($result);
return false;
}
}
else
{
$this->error = 'humanverify_new_recaptcha_wronganswer';
return false;
}
}
function output_token($var_prefix = 'humanverify')
{
global $vbphrase, $show;
$vbulletin =& $this->registry;
$humanverify = $this->generate_token();
$humanverify['publickey'] = ($this->registry->options['hv_new_recaptcha_publickey'] ? $this->registry->options['hv_new_recaptcha_publickey'] : '');
$humanverify['theme'] = $this->registry->options['hv_new_recaptcha_theme'];
$humanverify['type'] = $this->registry->options['hv_new_recaptcha_type'];
if (preg_match('#^([a-z]{2})-?#i', vB_Template_Runtime::fetchStyleVar('languagecode') , $matches))
{
$humanverify['hl'] = strtolower($matches[1]);
}
$templater = vB_Template::create('humanverify_new_recaptcha');
$templater->register('humanverify', $humanverify);
$templater->register('var_prefix', $var_prefix);
$output = $templater->render();
return $output;
}
function fetch_answer()
{
return '';
}
public static function test_check_config()
{
global $vbulletin;
$output = array();
if (!is_string($vbulletin->options['hv_new_recaptcha_publickey']) || $vbulletin->options['hv_new_recaptcha_publickey']=='')
$output[] = array(1, 'Site key is not set.');
else
$output[] = array(0, 'Site key is set: '.$vbulletin->options['hv_new_recaptcha_publickey']);
if (!is_string($vbulletin->options['hv_new_recaptcha_privatekey']) || $vbulletin->options['hv_new_recaptcha_privatekey']=='')
$output[] = array(1, 'Secret key is not set.');
else
$output[] = array(0, 'Secret key is set: '.$vbulletin->options['hv_new_recaptcha_privatekey']);
if (!function_exists('curl_init'))
$output[] = array(1, 'cURL must be enabled, and any curl_ functions must be removed from disable_functions in php.ini');
else
{
$output[] = array(0, 'cURL is enabled');
$curlinfo = curl_version();
if (empty($curlinfo['ssl_version']))
$output[] = array(1, 'cURL does not have ssl enabled');
else
{
$o = array("cURL version info:");
foreach ($curlinfo AS $key=>$value)
{
if ($key == 'features')
$value = '0x'.dechex($value);
if ($key == 'protocols')
$value = implode(', ',$value);
$o[] = $key.': '.$value;
}
$output[] = array(0, $o);
}
if (($ch = curl_init()) === false)
$output[] = array(1, 'curl_init failed');
else
curl_close($ch);
if (!function_exists('curl_exec'))
$output[] = array(1, 'Function curl_exec is disabled. curl_exec must be removed from disable_functions in php.ini.');
else
$output[] = array(0, 'curl_exec function is not disabled');
}
return $output;
}
public static function test_display_widget()
{
global $vbulletin;
return '<script src="https://www.google.com/recaptcha/api.js" async defer></script>
<div class="g-recaptcha" data-sitekey="'.$vbulletin->options['hv_new_recaptcha_publickey'].'"></div>';
}
public static function test_verify()
{
global $vbulletin, $vbphrase;
$output = array();
$vbulletin->input->clean_array_gpc('p', array(
'g-recaptcha-response' => TYPE_STR,
));
if (!isset($vbulletin->GPC['g-recaptcha-response']) || $vbulletin->GPC['g-recaptcha-response'] == '')
$output[] = array(1, 'g-recaptcha-response is not set. Complete the human verification challenge before pressing Submit.');
else
{
$output[] = array(0, 'g-recaptcha-response: ' . fetch_trimmed_title($vbulletin->GPC['g-recaptcha-response'], 50));
$secret = urlencode($vbulletin->options['hv_new_recaptcha_privatekey']);
$remoteip = urlencode(IPADDRESS);
$response = urlencode($vbulletin->GPC['g-recaptcha-response']);
$url = self::$verify_url."?secret=$secret&remoteip=$remoteip&response=$response";
$output[] = array(0, "verify url: '".fetch_trimmed_title($url,160)."'");
if (($ch = curl_init()) !== false)
{
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_HTTPHEADER, array());
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
$result = curl_exec($ch);
if ($result === false AND curl_errno($ch) == '60')
{
$output[] = array(0, "Error 60, retrying with CAINFO");
curl_setopt($ch, CURLOPT_CAINFO, DIR . '/includes/paymentapi/ca-bundle.crt');
$result = curl_exec($ch);
}
$info = curl_getinfo($ch);
if ($result === false)
$output[] = array(1, "curl_exec returned false: ".curl_error($ch));
else
{
if ($info['http_code'] != 200)
$output[] = array(1, "Http response code " . $info['http_code']);
$o = array("cURL transfer info:");
foreach ($info AS $key=>$value)
{
$o[] = $key.': '.$value;
}
$output[] = array($info['http_code'] != 200, $o);
if ($info['http_code'] == 200)
{
$output[] = array(0, "Raw response: ".htmlspecialchars($result));
if (($result = json_decode($result, true)) === NULL)
$output[] = array(1, "json_decode of response failed");
else
{
$o = array("Decoded response:");
foreach ($result AS $key=>$value)
{
if ($key == 'success')
$value = ($value ? 'true' : 'false');
if ($key == 'error-codes')
$value = implode(',', $value);
$o[] = $key.': '.$value;
}
$output[] = array($result['success'] ? 0 : 1, $o);
if ($result['success'] !== true)
{
$error = self::get_error_phrase($result);
require_once(DIR.'/includes/functions_misc.php');
$output[] = array(1, "Error Phrase: ".fetch_phrase($error, 'error'));
}
}
}
else
$output[] = array(1, "Http Response: ".htmlspecialchars($result));
}
curl_close($ch);
}
else
$output[] = array(1, "curl_init() failed.");
}
return $output;
}
}
?>
vBulletin updated the __constructor
Years ago I wanted to add it to my forum but I missed the registry error. Looking again I find your comment, I make the modification and ready. Problem solved, thank you very much. Plugin running in 4.2.5
translated by Google
SuperTaz
09-12-2018, 07:06 AM
When trying to add a new member they get this message using the fix a few posts above:
vBulletin Message
Unable to add cookies, header already sent.
File: /home2/public_html/forums/includes/class_humanverify_new_recaptcha.php
Line: 1
Global Gamers Forums
Any help on this? :confused:
TheBang
09-12-2018, 06:34 PM
So, I already did this for the vB3 version of this plugin several months ago. I had need to do a vB4 install too now, so I've done it for this one too:
I've repackaged this add-on into a 1.0.1 version, which you can download below. The main change is incorporating the required PHP fix (from above). So, this will work properly with vBulletin 4.2.5 and PHP 5.6/7.0/7.1. It should also work with earlier versions, though the minimum PHP version required is probably something like PHP 5.3.
I also updated all the UI elements to refer to the feature as "reCAPTCHA v2" instead of "New reCAPTCHA". I also updated the readme docs, correcting errors and typos.
doopz
09-28-2018, 12:49 PM
So, I already did this for the vB3 version of this plugin several months ago. I had need to do a vB4 install too now, so I've done it for this one too:
I've repackaged this add-on into a 1.0.1 version, which you can download below. The main change is incorporating the required PHP fix (from above). So, this will work properly with vBulletin 4.2.5 and PHP 5.6/7.0/7.1. It should also work with earlier versions, though the minimum PHP version required is probably something like PHP 5.3.
I also updated all the UI elements to refer to the feature as "reCAPTCHA v2" instead of "New reCAPTCHA". I also updated the readme docs, correcting errors and typos.
Thank you! installed in 5 min and works flawlessly.
Sean James
10-05-2018, 01:33 AM
When I try and upload the product XML file I am getting this error:
Access Denied - Sucuri Website Firewall
Block reason: An attempted XSS (Cross site scripting) was detected and blocked.
NeoDio
10-05-2018, 05:13 AM
vBulletin Message
Unable to add cookies, header already sent.
File: /home2/public_html/forums/includes/class_humanverify_new_recaptcha.php
I also get this message when new users register. Anyone know the fix for that?
Sean James
10-05-2018, 05:20 AM
When I try and upload the product XML file I am getting this error:
Access Denied - Sucuri Website Firewall
Block reason: An attempted XSS (Cross site scripting) was detected and blocked.
All good problem fixed, was a server problem
wawro
10-16-2018, 08:31 PM
It works fine on vb 4.2.3
No modification templates required.
Thanks a lot.
All The Best !
rekha
10-17-2018, 06:53 AM
i m not able to set this on my forum pls help
TheLastSuperman
10-18-2018, 08:52 PM
i m not able to set this on my forum pls help
Make sure you've uploaded the file in the .zip which is class_humanverify_new_recaptcha.php
From there it's > AdminCP > Settings > Human Verification Manager > Set to ReCaptcha v2.
*Note the site key and secret site key i.e. copy them to notepad before changing to v2 and saving, if you do not copy them then when you save the recaptcha type as v2 it will redo the fields and they'll be empty and you'll lose the values (so if you copy now you won't need to login to google to get the keys again you can just copy/paste from notepad).
So that means it's three steps:
1) Upload the one required file.
2) Change the ReCaptcha to v2 in Human Verification Manager
3) Re-enter site key and secret site key in settings and save again.
Modification will be enabled after that.
jetkai
11-04-2018, 05:26 PM
If anyone is having issues with PHP 7+ / vb 4.2.5 with the following error Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14
You'll need to replace the following in class_humanverify_new_recaptcha.php:
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::vB_HumanVerify_Abstract($registry);
}
with
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::__construct($registry);
}
not sure if there are any more issues aside from this, but registering works now on my forum.
MaKayWeB
12-05-2018, 07:32 PM
It's not working :(
AdamSC
12-12-2018, 03:21 PM
If anyone is having issues with PHP 7+ / vb 4.2.5 with the following error Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14
You'll need to replace the following in class_humanverify_new_recaptcha.php:
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::vB_HumanVerify_Abstract($registry);
}
with
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::__construct($registry);
}
not sure if there are any more issues aside from this, but registering works now on my forum.
Thanks - I was facing this problem. Is this just due to a change in PHP version from when this was made?
MaKayWeB
12-12-2018, 03:28 PM
I installed but after install when you open domain.com/register.php it's just white screen, why?
Teascu Dorin
12-16-2018, 08:30 AM
I installed but after install when you open domain.com/register.php it's just white screen, why?
Have you changed the code as mentioned in previous post?
I installed today this mod in vb 4.2.5 and PHP 7.1
After try, get this error:
Fatal error: Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() in /home/mydomain/public_html/includes/class_humanverify_new_recaptcha.php on line 14
With solution indicate by MarkFL:
On line 14 replace:
parent::vB_HumanVerify_Abstract($registry);
with
parent::__construct($registry);
Work perfect in vb 4.2.5 and php 7.1.
Thanks.
sangita
12-27-2018, 12:42 PM
Hi
i have uploaded the file to root directory
i have generated reCAPTCHA keys
i have imported the xml file via AdminCP
i have changed line 14 as suggested above
But still not seeing reCAPTCHA v2 http://prntscr.com/m06tqx
Hi
i have uploaded the file to root directory
i have generated reCAPTCHA keys
i have imported the xml file via AdminCP
i have changed line 14 as suggested above
But still now seeing reCAPTCHA v2 http://prntscr.com/m06tqx
Its in admincp->settings->human verification manager.
Not under options.
sangita
12-27-2018, 01:11 PM
Thanks
When i set this option http://prntscr.com/m078l0 it looks like this http://prntscr.com/m07988
and, when select this option http://prntscr.com/m079i4 i get 500 http error http://prntscr.com/m07ao5 :confused:
Thanks
When i set this option http://prntscr.com/m078l0 it looks like this http://prntscr.com/m07988
This is correct, v1 isn't available, its very old, not work.
and, when select this option http://prntscr.com/m079i4 i get 500 http error http://prntscr.com/m07ao5 :confused:
You are configured your account here?: http://www.google.com/recaptcha
And then input New reCAPTCHA Site Key and New reCAPTCHA Secret Key ?
If its yes, you can try your connection in the link of config captcha of admincp for view the connection.
sangita
12-28-2018, 07:45 PM
This is correct, v1 isn't available, its very old, not work.
you can try your connection in the link of config captcha of admincp for view the connection.
"config captcha of admincp " where exactly it is ? can you explain a lil more please ?
"config captcha of admincp " where exactly it is ? can you explain a lil more please ?
In the attach screenshot you can view how need you configured.
sangita
12-30-2018, 11:33 AM
In the attach screenshot you can view how need you configured.
HI
I already have done same settings http://prntscr.com/m1b3m5 , the problem is registration page is loading as it should http://prntscr.com/m1b4c8 :erm: but when i change it to "Image Verification" then registration page loads normally ..
You have your site in a proxy like cloudflare?
If its not, contact with your host.
sangita
01-13-2019, 06:57 AM
You have your site in a proxy like cloudflare?
If its not, contact with your host.
yeah, the site is running with cloudflare . do i need any settings on proxy site ?
yeah, the site is running with cloudflare . do i need any settings on proxy site ?
Configure/edit your config.php por resolve reals ip's of users.
hulkster
01-27-2019, 11:53 AM
Verification Results:
- g-recaptcha-response is not set. Complete the human verification challenge before pressing Submit.
Verification Failed.
What should i do ?
Piloux
01-31-2019, 06:57 PM
would be great if someone could implement it for login (instead of just registration).
Laredo
02-05-2019, 01:26 AM
If anyone is having issues with PHP 7+ / vb 4.2.5 with the following error Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14
You'll need to replace the following in class_humanverify_new_recaptcha.php:
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::vB_HumanVerify_Abstract($registry);
}
with
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::__construct($registry);
}
not sure if there are any more issues aside from this, but registering works now on my forum.
thanks!! is working!
Kane@airrifle
02-05-2019, 12:08 PM
Wrong thread
PattiOz
03-10-2019, 11:46 PM
Great mod, works after the tip above from Laredo. Thank you, it saved my forum because I am NOT going to upgrade from VB4 to VB5 or whatever it is at now.
final kaoss
05-10-2019, 09:43 AM
I notice that recaptcha v3 is out, can this be updated to support that?
https://developers.google.com/recaptcha/docs/versions
BetoPho
07-04-2019, 04:47 PM
FYI, I have made a v3 integration here (https://vborg.vbsupport.ru/showthread.php?p=2599719).
final kaoss
07-06-2019, 02:29 AM
Nice, I noticed that. However I noticed no mention of applying to registration. Good ideas on where else to implement it though.
kevinh
07-30-2019, 12:07 AM
Sorry for what is probably a really dumb question, but it's a long time since I installed an add-on in VB4.x and my almost 60yo brain has forgotten how to do it.
Where do I upload the file to? I don't have an "upload" folder on my server :erm:
PS. Oh I see, it just goes into Includes
PPS. Installed and working. Many thanks!!
Sorry for what is probably a really dumb question, but it's a long time since I installed an add-on in VB4.x and my almost 60yo brain has forgotten how to do it.
Where do I upload the file to? I don't have an "upload" folder on my server :erm:
PS. Oh I see, it just goes into Includes
PPS. Installed and working. Many thanks!!
Perfect! :)
biggazillakilla
09-18-2019, 10:41 PM
If it helps anyone, I rewrote the instructions:
- Download to desktop: kh99_new_recaptcha_v1_0.zip > extract all files
- Open FTP software and upload kh99_new_recaptcha_v1_0\upload\includes\class_huma nverify_new_recaptcha.php to myforum.com/includes
- myforum.com/ > admin control panel > Plugins & Products > Manage Products > at the bottom of the page [Add/Import Product] > Import Product > Choose file > product-kh99_new_recaptcha_v1_0 > click Import
- myforum.com/ > admin control panel > Settings > Human Verification Manager > choose 'New reCAPTCHA' > Save
- On the same page, at the bottom, enter the Site Key and Secret Key
- Test by using a private browsing session
Note: Be sure to use reCAPTCHA type v2 ("I'm not a robot" Checkbox) site keys, not reCAPTCHA type v3.
Hikarin
10-22-2019, 01:19 AM
Does that mean that the inbuilt reCAPTCHA doesn't support reCAPTCHA V2 keys?
djbaxter
10-22-2019, 01:48 AM
Does that mean that the inbuilt reCAPTCHA doesn't support reCAPTCHA V2 keys?
That's correct. You need this add-on to use V2. And you can't use V3 at all.
EchoBilisim
11-06-2019, 04:58 PM
hello I installed the plug-in does not seem to be a problem when I test, but when you enter the member panel gives 500 error
x iJailBreak x
11-09-2019, 01:53 PM
hello I installed the plug-in does not seem to be a problem when I test, but when you enter the member panel gives 500 error
Can you view your error logs? If you're running PHP 7+ you will likely have to make a modification to get it functional. We had to do so on our vB4 powered board when we moved to PHP 7.3.
Hostboard
11-17-2019, 07:54 PM
hello I installed the plug-in does not seem to be a problem when I test, but when you enter the member panel gives 500 error
Did you make the required file edit for PHP 7.1 as noted here:
https://vborg.vbsupport.ru/showpost.php?p=2598385&postcount=341
slickdawg
01-13-2020, 08:10 PM
I'm on 4.2.5 with php 5.6.26 and I cannot get this to work. Either the 1.0 or 1.0.1 version.
The 1.0.1 version installed fine, everything tested successfully. When you go to register, you enter your information, and the error appears on the registration page:
reCAPTCHA could not be verified due to server issues. Please try again later.
I've looked through log files and don't see anything. Any help is appreciated!
Hostboard
01-13-2020, 09:32 PM
I'm on 4.2.5 with php 5.6.26 and I cannot get this to work. Either the 1.0 or 1.0.1 version.
The 1.0.1 version installed fine, everything tested successfully. When you go to register, you enter your information, and the error appears on the registration page:
reCAPTCHA could not be verified due to server issues. Please try again later.
I've looked through log files and don't see anything. Any help is appreciated!
Did you create new reCAPTCHA and copy them over? No missing characters or extra white spaces.
slickdawg
01-14-2020, 06:52 PM
Did you create new reCAPTCHA and copy them over? No missing characters or extra white spaces.
I did. It's perplexing! I tried the 1.0 version, got the 500 error. Tried that php code change for it, no dice. Uninstalled it and tried 1.0.1, the test part worked fine. :confused:
I just installed the reCAPTCHA V3 add in, it seems to be working fine.
GiaNNi
01-15-2020, 06:26 AM
Did you make the required file edit for PHP 7.1 as noted here:
https://vborg.vbsupport.ru/showpost.php?p=2598385&postcount=341
I had same issue and this fixed it, thank you!! :)
Za4a Tuner
02-16-2020, 02:13 PM
Hello,
i've a problem with this product.
vBuleltin: 4.2.5
php: 7.1.33
I've uploaded the file into "includes", installed the addon ... but i don't get the "checkbox" to use the "new reCaptcha".
The others settings (newrecaptcha key) are shown.
Does anyone know how i can get it running?
kr Chris
Younicode
03-07-2020, 03:24 AM
I installed this hack but no options are added in the settings.
vBulletin 4.2.5 php 7.1.31
I installed this hack but no options are added in the settings.
vBulletin 4.2.5 php 7.1.31
And in this part, not appears, I have installed and I have same image like you.
Bulent Tekcan
03-29-2020, 04:09 PM
Hello,
I'm using Verify Mail before registration plugin also.
Is it possible to add this verification this screen ?
Regards
Younicode
04-17-2020, 02:13 AM
I want the capcha to be displayed in the hack below. Can anyone help?
https://vborg.vbsupport.ru/showthread.php?t=294164
puertoblack2003
05-01-2020, 11:05 AM
I installed this hack but no options are added in the settings.
vBulletin 4.2.5 php 7.1.31
its in settings> Human Verification Manager on the side control panel.
Younicode
05-01-2020, 09:58 PM
its in settings> Human Verification Manager on the side control panel.
Thanks. I found the settings. Can you help display this hack on the Verify Email page?
https://vborg.vbsupport.ru/showthread.php?t=315960
Prince
01-21-2021, 05:19 PM
This does not seem to work on 4.2.5
djbaxter
01-21-2021, 05:42 PM
This does not seem to work on 4.2.5
I've had it working on my last remaining vBulletin forum 4.2.5 for yonks.
What happens when you install it? Have you selected "new reCaptcha" at the top and entered the new site key and private key from Google?
Have you tested it using
New reCAPTCHA Verification
New and improved version of reCAPTCHA
Click here to test connection
Are you getting error messages?
Prince
01-21-2021, 06:12 PM
I've had it working on my last remaining vBulletin forum 4.2.5 for yonks.
What happens when you install it? Have you selected "new reCaptcha" at the top and entered the new site key and private key from Google?
Have you tested it using
New reCAPTCHA Verification
New and improved version of reCAPTCHA
Click here to test connection
Are you getting error messages?
I was getting a 500 HTTP error on two forums after I upgraded from 4.2.4 to 4.2.5.
Maybe I will try re-installing it.
djbaxter
01-21-2021, 07:03 PM
I would recommend that. :)
Prince
02-01-2021, 05:35 PM
I would recommend that. :)
I reinstalled it and I get no errors when running the test, but I still get a 500 HTTTP error when I try and register.
jetkai
05-14-2021, 12:52 AM
This does not seem to work on 4.2.5
I believe this still works if you're using PHP 7.X
https://vborg.vbsupport.ru/showpost.php?p=2597181&postcount=323
Prince
05-17-2021, 04:08 PM
I believe this still works if you're using PHP 7.X
https://vborg.vbsupport.ru/showpost.php?p=2597181&postcount=323
Cool, thanks!:up:
popup
04-19-2022, 01:28 PM
If anyone is having issues with PHP 7+ / vb 4.2.5 with the following error Call to undefined method vB_HumanVerify_Abstract::vB_HumanVerify_Abstract() on line 14
You'll need to replace the following in class_humanverify_new_recaptcha.php:
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::vB_HumanVerify_Abstract($registry);
}
with
function vB_HumanVerify_New_Recaptcha(&$registry)
{
parent::__construct($registry);
}
not sure if there are any more issues aside from this, but registering works now on my forum.
I'm using VB 4.2.5 on PHP 7.0. This trick solved my problem. Thanks!
MentorBR
05-10-2022, 08:15 PM
Can anyone explain why when I install the plugin it only installs on the mobile theme?
meschiash
05-17-2023, 12:29 PM
From one week I have a problem with this add-on. In reply I have info: reCAPTCHA could not be verified due to server issues. Please try again later..
Any solution's?
oldfan
05-18-2023, 11:24 PM
isnt this built into 4.2.5?
wolfe
10-22-2023, 01:14 PM
seems to clash with this https://vborg.vbsupport.ru/showthread.php?t=297834
getting this reCAPTCHA could not be verified due to server issues. Please try again later. on people requesting new passwords.
mainframe
11-10-2023, 08:19 AM
This mod stopped working around 21 Oktober. Also getting the error that recaptcha cannot be verified due to server error. The test feature in the admin panel works fine.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.