MyBB Community Forums

Full Version: [SOLVED] MyBB default captcha delay
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I get errors for both mybb default captcha and recaptcha
I got my public and secret key for recaptcha


When i put mybb to have default captcha i get this in the registration field
[attachment=37402]

And when i set mybb to use the recaptcha with the correct keys i get this in the registration field

[attachment=37403]

I realized my public key for recaptcha was indeed incorrect (missed a letter copying)

I also noticed that when i switch MyBB the default captcha , it takes like 20 seconds for hte image to load. Why is that?

EDIT:
title changed to not reflect my typo.
Quote:I also noticed that when i switch MyBB the default captcha , it takes like 20 seconds for hte image to load. Why is that?
captcha.php used to use my_rand(), which we changed in 1.8.7 to use stronger random number generators. However, the captcha never needed cryptographically secure numbers, so it was adversely impacted when we used more intensive functions in my_rand() thousands of times to generate the captcha image.

Applying the changes in https://github.com/mybb/mybb/commit/824b...33444ed86c
to your captcha.php file should fix the problem. Basically just change my_rand() to rand().
i installed mybb 1.8.7 anew. So shouldnt those changes be on my installation?

EDIT:
hmm i guess not. Checked that file and there was my_rand

So i just needed to change all instances of my_rand to rand? Such as...

sudo sed -i -e 's/my_rand/rand/g' captcha.php

Yup that fixed it. Instantaneously loads the captcha now....Thanks