服务器特定的某些内容不允许与 Facebook 连接

发布于 2025-01-06 06:10:53 字数 654 浏览 1 评论 0原文

我的 FB connect 在我的网站上运行得非常好。然后有一天,我们发现它不再起作用了。它没有给出任何错误,但是当我尝试从我的 facebook 类执行 getUser() 函数时,对发送我的签名请求的响应返回空,没有用户数据。这是基本问题,但让我详细说明我已经确定的内容。

我相信服务器有某种问题,要么是 httpd.conf 中的问题,要么是 php.ini 中的问题,这就是原因。

我将 FB 集成所需的所有 PHP 页面转移到另一台服务器和另一个域。他们工作得很好。对我来说,这排除了代码本身或我正在使用的 Facebook 应用程序设置的问题。

然后我回到问题服务器,设置第三个域并再次尝试相同的操作。这是行不通的。因此,对我来说,排除了我最终试图再次工作的特定域的问题。

我承认,我不知道在它正常工作和突然不工作之间可能发生了哪些变化。如果我这样做了,我有一个可靠的想法,我就会把它撤回。我确实有人“用 mod_deflate 和 mod_cache 重新编译 apache”。我试图寻找那些导致 FB 出现问题的原因,但没有找到任何东西。

PHP 版本 5.3.10

服务器版本:Apache/2.2.22 (Unix) 服务器建成:2012年2月10日20:31:21 Cpanel::Easy::Apache v3.9.1 rev9999

感谢您阅读我的问题。

I had FB connect working perfectly fine on my site. Then one day, we noticed it was no longer working. It is not giving any errors, but when I try to do the getUser() function from my facebook class, the response to the send of my signed request is coming back empty, no user data. That is the basic problem, but let me detail what I have nailed down.

I believe there is a problem with the server somehow, either something inside httpd.conf or perhaps php.ini and here is why.

I took all my PHP pages that are required for the FB integration over to another server and another domain. They worked fine. That, to me, ruled out a problem with the code itself, or the Facebook App settings I am using.

I then went back to the problem server, and setup a 3rd domain and tried the same thing again. It would not work. So that, to me, ruled out a problem with the specific domain I am ultimately trying to get working again.

I will admit, I dont know what changes may have been made between the time it was working and when it suddenly was not. If I did, I had a solid idea, I would just roll it back. I did have someone, "recompile apache with mod_deflate and mod_cache." I tried to search for those causing a problem with FB but didnt find anything.

PHP Version 5.3.10

Server version: Apache/2.2.22 (Unix)
Server built: Feb 10 2012 20:31:21
Cpanel::Easy::Apache v3.9.1 rev9999

Thank you for reading my question.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£噩梦荏苒 2025-01-13 06:10:53

我已经解决了我的情况。我的解决方案的关键是转到 base_facebook.php 的第 633 行并执行 echo $e;以确定令牌响应失败的原因。然后我设法确定了问题的根源:

CurlException:1:libcurlCurl中不支持或禁用协议https

因此我联系了我的服务器支持人员,他们告诉我,“curl php模块是在没有ssl支持的情况下构建的。”他们说

“我几乎肯定,当我重建 apache 时,我确保检查了 curlssl。这是人们要求启用的典型选项,所以我总是确保它已启用。”

所以最终的解决方案是他们必须使用curlssl模块重新编译apache和php。

I have resolved my situation. The key to my solution was going to line 633 of base_facebook.php and going an echo $e; to determine why the token response was failing. I then managed to identify the root of the problem:

CurlException: 1: Protocol https not supported or disabled in libcurlCurl

So I contacted my server support people who informed me, "The curl php module has been built without ssl support." which was after they had said

"I am almost positive that when I rebuild apache I made sure curlssl was checked. This is a typical option that people request to have enabled, so I always make sure it is enabled."

So the end solution was that they had to recompile apache and php with the curlssl module.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文