Facebook SDK for PHP 错误 - CurlException:35:错误:14094410:SSL 例

Facebook SDK for PHP error - CurlException: 35: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure(Facebook SDK for PHP 错误 - CurlException:35:错误:14094410:SSL 例程:SSL3_READ_BYTES:sslv3 警报握手失败) - IT屋-程序员
本文介绍了Facebook SDK for PHP 错误 - CurlException:35:错误:14094410:SSL 例程:SSL3_READ_BYTES:sslv3 警报握手失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我使用 Facebook SDK for PHP v2.0 的应用在过去 20 到 24 小时内停止工作.我不断从 base_facebook.php 收到以下错误 -

My app using Facebook SDK for PHP v2.0 stopped working since the past 20 - 24 hours. I keep getting the following error from the base_facebook.php -

CurlException:35:错误:14094410:SSL 例程:SSL3_READ_BYTES:sslv3 警报握手失败

CurlException: 35: error:14094410:SSL routines:SSL3_READ_BYTES:sslv3 alert handshake failure

通过阅读 stackoverflow 上的其他线程,我将以下代码行添加到 base_facebook.php,但这些都没有帮助.

From reading the other threads on stackoverflow I added the following lines of code to base_facebook.php but none of these help.

$opts[CURLOPT_SSL_VERIFYPEER] = false;
$opts[CURLOPT_SSL_VERIFYHOST] = false;
$opts[CURLOPT_SSLVERSION] = 3;
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');

任何解决问题的建议将不胜感激.谢谢.

Any suggestions to the fix the issue would be highly appreciated. Thanks.

推荐答案

这里是因为 SSLv3 漏洞:https://access.redhat.com/articles/1232123Facebook 禁用了 SSLv3,因此您无法再使用它.

It's because SSLv3 vulnerbility here: https://access.redhat.com/articles/1232123 Facebook disabled SSLv3 so, you cannot use it anymore.

如果您有 php 5.5 或 5.6,请尝试更改

If you have php 5.5 or 5.6, try change

$opts[CURLOPT_SSLVERSION] = 3;

$opts[CURLOPT_SSLVERSION] = CURL_SSLVERSION_TLSv1;

如果您可以使用它而不会经常出错,那就可以了.如果你的php版本低于5.5,把这两行注释掉就可以了.

If you can use it without constant error, it's ok. If you have php version lower than 5.5, just comment these 2 lines out and it will be fine after that.

$opts[CURLOPT_SSLVERSION] = 3;
curl_setopt($ch, CURLOPT_SSL_CIPHER_LIST, 'SSLv3');

这篇关于Facebook SDK for PHP 错误 - CurlException:35:错误:14094410:SSL 例程:SSL3_READ_BYTES:sslv3 警报握手失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)