间歇性会议 [英] Intermitant Sessions

查看:63
本文介绍了间歇性会议的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在部署一个网站,但遇到了问题.我正在我的客户托管包的子目录中测试我的代码,一切似乎都很好.但是,我已将文件夹/文件移动到站点根目录,现在我间歇性地丢失了所有会话数据.

I have a site I'm deploying and I've hit a problem. I was testing my code in a sub-directory of my clients hosting package and everything seemed fine. However I've moved the folders/files to the site root and now I'm intermittently losing all session data.

我查看了 Firefox 中的 LiveHeaders,正在设置这些 cookie:

I've taken a look with LiveHeaders in Firefox and these cookies are being set:

    Cookie: __utma=196298984.443251570.1275554915.1275554915.1275557276.2;
 __utmz=196298984.1275554915.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none);
 __utmb=196298984.188.10.1275557276; PHPSESSID=3f5a363de3b7ec6084c7fdf90bec78a8; 
__utmc=196298984 

    Cookie: __utma=196298984.443251570.1275554915.1275554915.1275557276.2; _utmz=196298984.1275554915.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__utmb=196298984.189.10.1275557276; PHPSESSID=3f5a363de3b7ec6084c7fdf90bec78a8; 
__utmc=196298984

我绝不是标题方面的专家,因此如果您需要其他信息,我应该能够获得.

I'm by no means an expert on headers so if you need other information, I should be able to get it.

推荐答案

我想到的一些事情:

1:确保如果您的会话是在 www.abc.com 上创建的,那么所有浏览都发生在该域上,如果某些页面被发送到 abc.com 而不是 www.abc.com,这是可能会导致会话/cookie 问题.

1 : Make sure that if your session is being created on www.abc.com, then all browsing happens on exactly that domain, if some pages are being sent to abc.com instead of www.abc.com, this is likely to cause session/cookie problems.

2 : 还要确保 session_start 指令在所有页面的顶部都可用.

2 : also make sure that session_start instruction is available on top of ALL pages.

这篇关于间歇性会议的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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