Amit Kashyap
Amit Kashyap

Reputation: 273

Google recaptcha not working on my site but work in other site

Following error occured:-

Warning: file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it when you configured PHP? in /home/massage/public_html/contact.php on line 308

Warning: file_get_contents(https://www.google.com/recaptcha/api/siteverify?secret=6Ld4pA4UAAAAAGCJdIXceBEy7jmtkFojF9RQ9prN&response=03AHJ_VusREbRm-vVy4WRxjeayHGNkQOkjQ1p50SyN2MfyqEJAzl3hOjeaQFcS_31_URx_JcwF_cHAhMKKa98HjTWlEcdBPO8i1xDyrjgWwC1-ffqHUFgsNZTnABfkOniaAkUf0BXVWRa6mqwVfLsTYsCWq_A1UKxbkHsxNjPyOxXt9pPebhEdmsuJdlw5REFr6S1glYCfYw6ysMA2a9hh4P_rAILBlI5PHW4jWn4r2rH4Ekgq-4D8WGvcDO0FaGzk6Oi-JN1cIDvSl7GyPCwuvyQ1Dl-JWivMK2Msf7Cr35GYoA9c5uEbprB0JXILP2v0ErLeBbowPzsYtpPKqzA4IzpJVXnuoJwjR-B2RI90j87QtD4CjJ4gSoGn-RF6-cwlpyk_JFzxxkWOD2sya4oKJEC628A_0liL2RuWzW-s43vElzh-yKPu2OOTkTTsdD5w8XRWetljD3jyGOhG-pLVT7sEXBUOQHsejLe7wzjfekbhrjyIr23tBfmxnKp9pa3ZW63fGJtT8hPV94Fv2hbsRCS8kWVfs5p_hmhdYhhKac-7FDZv81GFuClyZiWOA3QD99wtrlPxH09nT1ufndWG3nfbAdWxXhcWLxHBcPWen5KShKhLVotqBnlf-eXLD2ObBLTQfTdw1-NhN1fSDhpHHbxTM-Wydx87qExf9yPeQxf4m3z8vr6quL-AtPcUQxW-_M3ElkmjPSBlaBoBhjp91NSSM7oujM6Feezz5j8R5EjirUaa4GubyEul_qAPRj9RWfeIbLbK6FjSmrkduM2092utZXFR0UOra5kL27QY9XEiFZzWFLikGm430jdqSkFSK_DXneyWHNTm5suFHLBVf-6-1whrMn83_jJKnxeqJczq0-_A-dAqVPrZYuca_nM in /home/massage/public_html/contact.php on line 308 Robot verification failed, please try again.

Upvotes: 3

Views: 499

Answers (2)

Trac Nguyen
Trac Nguyen

Reputation: 486

You should check open_ssl extension to see whether it is enabled or not, then recheck you Google API key to see if Google allow you to use on your domain.

Upvotes: 0

Hassaan
Hassaan

Reputation: 7672

It seems like openssl extension is not enabled. You need to add following line to your php.ini.

For Windows

extension=php_openssl.dll

For Others

extension=openssl.so

Note

Don't forget to restart Apache after updating php.ini

Update 1

$url= 'https://example.com';

$arrContextOptions=array(
      "ssl"=>array(
            "verify_peer"=>false,
            "verify_peer_name"=>false,
        ),
    );  

$response = file_get_contents($url, false, stream_context_create($arrContextOptions));

This will allow you to get the content from the url whether it is a HTTPS

Upvotes: 0

Related Questions