Zakir Hyder
Zakir Hyder

Reputation: 617

Failed to connect to 2a03:2880:10:1f03:face:b00c:0:26: Network is unreachable from Facebook PHP SDK

I am using Facebook Current PHP SDK. My app was running ok. BUt from today any api call returning Failed to connect to 2a03:2880:10:1f03:face:b00c:0:26: Network is unreachable.

Here is my code

  try {
    $fbme = $facebook->api('/me');
  } catch (Exception $e) {        
  echo $e->getMessage();        
  }

Is any one having this problem? How can I fix this?

Upvotes: 8

Views: 16024

Answers (2)

Le Gnav
Le Gnav

Reputation: 113

There is one more solution for this problem, found it on http://codecorner.galanter.net/2011/06/03/solution-for-wordpress-curl-ipv6-error-network-is-unreachable/

You can simply force IPV4 resolve by setting the following curl option :

curl_setopt( $handle, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);

Upvotes: 11

Igy
Igy

Reputation: 43816

Your server's network or firewall is likely misconfigured; disable your IPV6 interface if you don't have IPV6 connectivity

Upvotes: 6

Related Questions