Reputation: 617
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
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
Reputation: 43816
Your server's network or firewall is likely misconfigured; disable your IPV6 interface if you don't have IPV6 connectivity
Upvotes: 6