Blocked loading mixed active content http://www.google.com/recaptcha/api/challenge?k=KEY
This article is inteded for developers using reCAPTCHA Library for PHP (recaptcha-php-1.11).
When I access my website over SSL, Google Recaptcha doesn't load.
Blocked loading mixed active content
"http://www.google.com/recaptcha/api/challenge?k=KEY-GOES-HERE" [Learn More]
What causes this problem?
You will see the Blocked loading mixed active content error when accessing your website over https (ssl) but calling Google's recaptcha using http (no ssl). Your browser is blocking the insecure content which is trying to load over http (no ssl).
The solution to this problem is to use SSL when calling the recaptcha_get_html function to create your recaptcha form.
If you look at around line 106 of recaptcha-php-1.11/recaptchalib.php, you'll see the function has an optional ssl parameter:
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
Changing your code from the red example below to the green example below should fix this error for you:
$recaptcha = recaptcha_get_html($publickey); $recaptcha = recaptcha_get_html($publickey,'',true);
2014-07-31 3:41 pm
Thank you so much! This was exactly the solution I was looking for.