Nic*_*ick 5 php ssl curl facebook facebook-graph-api
我随机得到以下错误.它不会每次都发生.
PHP Fatal error: Uncaught CurlException: 28: Operation timed out after 60 seconds with 47 out of 47 bytes received
PHP Fatal error: Uncaught CurlException: 28: connect() timed out!
PHP Fatal error: Uncaught CurlException: 35: Unknown SSL protocol error in connection to graph.facebook.com:443
Run Code Online (Sandbox Code Playgroud)
我尝试过的是
1. adding CURLOPT_SSLVERSION => 3 (even try changing to 2)
2. changing 'https://api-read.facebook.com/' to 'api_read' => 'https://api.facebook.com/'
3. adding $opts[CURLOPT_SSLVERSION] = 3;
curl_setopt( $ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4 );
4. Changing CURLOPT_CONNECTTIMEOUT => from 10 to 60
5. closing IPv6 and add 69.171.224.54 graph.facebook.com to /etc/hosts (several other IPs also added)
6. telnet graph.facebook.com 443 and nslookup graph.facebook.com
Run Code Online (Sandbox Code Playgroud)
我不知道在哪里看得更远.请帮忙!
仅供参考:cURL支持=启用,cURL信息= 7.15.5,OpenSSL版本= 0.9.8e(我可以在Centos 5.7上更新)
所有这些错误都与 HTTP 过程的各个阶段的连接超时有关:
正如 Shawn E. Carter 上面所说,这个错误似乎是同一个问题https://developers.facebook.com/bugs/328399317246454?browse=search_4ff4817e0c5ec9768956669与这个问题Can not connect to Facebook with a curl request
归根结底,这只是意味着 Facebook 的 API 服务器比预期慢了一点。您可以尝试使用更长的超时,或者,由于它是间歇性的,捕获异常并重试。
| 归档时间: |
|
| 查看次数: |
3703 次 |
| 最近记录: |