Facebook PHP Sdk(Nginx Php-Fpm)缺少会话 [英] Sessions are Missing With Facebook PHP Sdk (Nginx Php-Fpm)

查看:128
本文介绍了Facebook PHP Sdk(Nginx Php-Fpm)缺少会话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个不同的服务器,一个有Facebook的登录问题。经过几天和几个小时的调试,我意识到我只能从Facebook会话数组获得一个会话。



服务器与Php-Fpm和Nginx也已经在服务器上安装了memcached。但是不要在memcached上记录会话。



PS:当我们在我们的服务器上安装ssl时,我意识到我的Facebook登录不正常。截至6月19日,我的Facebook应用程序摘要不显示任何活跃的用户。



我在调试我的服务器之前已经提出了一个问题,所以这个问题与这个问题不同,你可以在那里找到一些线索。



Codeigniter getuser()在facebook对话框后返回0

  Array 

[fb_318641601624810_state] => a44e40cd3f78e7bd3ff39308aebf32ef

hostgator

  Array 

[69a781bf56f6d6bfec49fd65c890f879_fb_136649313157374_state] => 6df72b81b5be574ea5b263ef97225b3b
[fb_319000531588917_code] = > AQCAGxOs9dtrS9ppFC6NhLOiWc1moSLPMl0JewkEYYrBWKP7PvL9hv_LuV6vv3pmBzmawpQ8J5aj3hl9ZEiHEWlm5hw9EroLH_JOVXv3YvJcZfdzknQ1QscPnEQr8DgYbFOH-_S193p7Fv2PNd0U3IR1zE1Jb9YOjHorzWjW5iyrGzu2mF3 g7Nmg2ONEibmlNQUKUwljcUC7lyzxeC6qjHMEkYqDm3-f8xWx7OjVtQQzFoRZzXgTOislJ7-JQ0LHnu4kZjT46Q0K64Bvz040ab2hwoRjyiUIgWwFpctuYMtqYxxRnt2nJXNRCn8oigF_LB0
[fb_319000531588917_access_token] => CAAEiIRleVzUBACpazeUMcTvULMpPZADu5QwiPpAU0RUmHGIFNkWsvfQKPCvBpC3ZA8C1IfuALn0YVyobGffp52o1ZBJbpiPSx66ZBO6MGoEZBhRkLjsjIZASRxvNyLhj5mqddxbcREZCznuYyeVLZAa97IiHA9ZC3arkJZBThtuYylLym8jG8zdTtaHIoG0oKKeb8ZD
[fb_319000531588917_user_id] => 608666757

我开始比较php.ini confs,但没有运气,是可能有这样的问题吗?还是我调试错了?因为我已经工作了2-3天,我几乎变得疯狂。



我的测试页面都是不同的测试应用程序。这些不是基于Codeigniter的测试页面,它们是简单的php sdk,我想知道如果问题是与Codeigniter。



所以问题是我的nginx站点永远不会返回



您可以从这里比较我的phpinfo文件。



比较Phpinfo文件



我将会真的很高兴,如果你可以帮我调试这个问题,现在没有人可以注册或登录我的Facebook登录。



只有一个方案工作,如果用户已经批准我应用程式过去用户必须在访问令牌错误后再次单击登录。

解决方案

经过大量调试和会话处理程序测试。我意识到主要的问题是PHP 5.5仍然保持状态会话。而query_string状态码与状态码无法匹配。所以总是在PHP 5.5上的CSRF问题。



我将使用php 5.4安装新的服务器。会让你了解这个错误。


I have 2 different servers and one has login problem with facebook. After days and hours debugging , I realized that I can get only one session from facebook session array.

Server with Php-Fpm and Nginx has also memcached installed on server. But never record sessions on memcached.

PS: I realized that my facebook login doesn't work properly, when we installed ssl on our server. Till 19th of june, my facebook app summary doesn't show any active users.

I already asked a question before debugging my server, so this question different than this question but you could have some clues there.

Codeigniter getuser() returns 0 after facebook dialog

Array
(
    [fb_318641601624810_state] => a44e40cd3f78e7bd3ff39308aebf32ef
)

Hosting from hostgator

Array
(
    [69a781bf56f6d6bfec49fd65c890f879_fb_136649313157374_state] => 6df72b81b5be574ea5b263ef97225b3b
    [fb_319000531588917_code] => AQCAGxOs9dtrS9ppFC6NhLOiWc1moSLPMl0JewkEYYrBWKP7PvL9hv_LuV6vv3pmBzmawpQ8J5aj3hl9ZEiHEWlm5hw9EroLH_JOVXv3YvJcZfdzknQ1QscPnEQr8DgYbFOH-_S193p7Fv2PNd0U3IR1zE1Jb9YOjHorzWjW5iyrGzu2mF3g7Nmg2ONEibmlNQUKUwljcUC7lyzxeC6qjHMEkYqDm3-f8xWx7OjVtQQzFoRZzXgTOislJ7-JQ0LHnu4kZjT46Q0K64Bvz040ab2hwoRjyiUIgWwFpctuYMtqYxxRnt2nJXNRCn8oigF_LB0
    [fb_319000531588917_access_token] => CAAEiIRleVzUBACpazeUMcTvULMpPZADu5QwiPpAU0RUmHGIFNkWsvfQKPCvBpC3ZA8C1IfuALn0YVyobGffp52o1ZBJbpiPSx66ZBO6MGoEZBhRkLjsjIZASRxvNyLhj5mqddxbcREZCznuYyeVLZAa97IiHA9ZC3arkJZBThtuYylLym8jG8zdTtaHIoG0oKKeb8ZD
    [fb_319000531588917_user_id] => 608666757
)

I start to compare php.ini confs but there is no luck, is it possible have problem like this? Or am I debugging wrong? Because I have been working on this for 2-3 days and I'm nearly getting crazy.

My testing page both of them are different apps for testing. These are not Codeigniter based testing pages they are simple php sdk's, I wanted to know that if the problem is with Codeigniter.

So the problem is my nginx site never get return access_token in session array.

You could compare my phpinfo files from here.

Compare Phpinfo files

I will be really happy if you could help me on debugging this problem, now nobody could sign up or login from my facebook login.

Just only one scenario works, if user already granted my app in past. User has to click login again after access token error.

解决方案

After alot debugging and session handler tests. I realized that the main problem is PHP 5.5 still keeps state session. And query_string state code couldn't match state codes. So always CSRF problem on PHP 5.5.

I will install new server with php 5.4. Will keep you about this bug.

这篇关于Facebook PHP Sdk(Nginx Php-Fpm)缺少会话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆