{"id":1740,"date":"2022-08-30T15:19:03","date_gmt":"2022-08-30T15:19:03","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2013\/11\/30\/adding-facebook-ipv6-to-centos-getting-curlexception-7-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:19:03","modified_gmt":"2022-08-30T15:19:03","slug":"adding-facebook-ipv6-to-centos-getting-curlexception-7-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/adding-facebook-ipv6-to-centos-getting-curlexception-7-collection-of-common-programming-errors\/","title":{"rendered":"Adding Facebook IPv6 to Centos, getting CurlException 7-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m correctly get following error. After searching about this issue, correct me if i&#8217;m wrong, I believe that adding\/configuring IPv6 should solve the problem.<\/p>\n<pre><code>PHP Fatal error:  Uncaught CurlException: 7: Failed to connect to 2a03:2880:10:8f02:face:b00c:0:26: Network is unreachable\\n  thrown in \/var\/www\/vhosts\/facedex.net\/httpdocs\/fb\/apps\/seemyfuture\/src\/base_facebook.php on line 886\n<\/code><\/pre>\n<p>The problem is I dont know the right way to add it. There seems to have may methods. http:\/\/tldp.org\/HOWTO\/Linux+IPv6-HOWTO\/x1035.html#AEN1044 http:\/\/unix.stackexchange.com\/questions\/34093\/static-ipv4-ipv6-configuration-on-centos-6-2<\/p>\n<p>My netstat show this. Shell doesnt recogize -rn6 though.It shows invalid option &#8212; 6<\/p>\n<pre><code>netstat -rn\nKernel IP routing table\nDestination     Gateway         Genmask         Flags   MSS Window  irtt Iface\n27.254.38.128   0.0.0.0         255.255.255.128 U         0 0          0 eth0\n169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0\n0.0.0.0         27.254.38.254   0.0.0.0         UG        0 0          0 eth0\n<\/code><\/pre>\n<p>FYI: I&#8217;m using Centos 5.7.<\/p>\n<p>Thank you a lot in advance.<\/p>\n<ol>\n<li>\n<p>I&#8217;m assuming that you don&#8217;t actually have IPv6 connectivity, in which case you probably want to disable IPv6.<\/p>\n<\/li>\n<li>\n<p>Short of globally disabling ipv6 you can try the &#8211;ipv4 argument to curl. I think that is what I used in a similar situation.<\/p>\n<\/li>\n<li>\n<p>You can&#8217;t just arbitrarily configure IPv6. You need to get IPv6 from your <strong>ISP<\/strong>, or create a tunnel with <strong>Hurricane Electric<\/strong>, <strong>Gogo6<\/strong> or similar.<\/p>\n<\/li>\n<\/ol>\n<p id=\"rop\"><small>Originally posted 2013-11-30 06:01:30. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I&#8217;m correctly get following error. After searching about this issue, correct me if i&#8217;m wrong, I believe that adding\/configuring IPv6 should solve the problem. PHP Fatal error: Uncaught CurlException: 7: Failed to connect to 2a03:2880:10:8f02:face:b00c:0:26: Network is unreachable\\n thrown in \/var\/www\/vhosts\/facedex.net\/httpdocs\/fb\/apps\/seemyfuture\/src\/base_facebook.php on line 886 The problem is I dont know the right way to add [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1740","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=1740"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/1740\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=1740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=1740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=1740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}