Recaptcha not working on https

后端 未结 7 1830

i have a site in codeigniter,and that site working perfectly on http.

My client moved the site to https.

Then now when user registr

7条回答
  •  鱼传尺愫
    2020-12-18 01:45

    I got the same error an tried all suggestions but nothing work for me.

    then i did analyzed the issue and then i got SSL certificate issue

    this certificate is only valid for the following names: www.google.com (Error code: ssl_error_bad_cert_domain)

    so i changed

    echo recaptcha_get_html($publickey,,true);
    
    @fsockopen($host, [...] to @fsockopen(gethostbyname($host), [...]
    

    along with

    define("RECAPTCHA_API_SECURE_SERVER", "https://api-secure.recaptcha.net");

    to

    define("RECAPTCHA_API_SECURE_SERVER", "https://www.google.com/recaptcha/api");

    in recaptchalib.php and recaptcha worked again.

提交回复
热议问题