Skip to content

How to Resolve "Could not open socket" From reCaptcha

If you met the following error from the browser, it could be a reCaptcha problem.

Could not open socket

It seems a DNS problem, you can take the following steps to resolve:

  1. Make sure the value of RECAPTCHA_VERIFY_SERVER in recaptchalib.php.
  2. ...
    define("RECAPTCHA_VERIFY_SERVER", "");
  3. Get A records of the verify server.
  4. [root@localhost ~]# host has address has address has address has address has address has IPv6 address 2404:6800:4005:c00::68
  5. Add the A records to you local host file.
  6. [root@localhost ~]# vi /etc/hosts

It should work fine now.

Another way to resolve this is to add reliable name servers like Google public DNS to your network configuration:

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Don't forget to restart the primary NIC or network service to take effect.

Leave a Reply

Your email address will not be published. Required fields are marked *