被PHP会话问题所迷惑(Rackspace) [英] Confused by PHP session problem (Rackspace)

查看:111
本文介绍了被PHP会话问题所迷惑(Rackspace)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的PHP会话在不同的值之间波动,没有明显的原因.这是证明我的测试代码:

My PHP session fluctuates between different values for no apparent reason. here is my test code that proves it:

<?php
//test.php
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);

session_start();

print_r($_SESSION);

?>

当我刷新那个test.php时,$_SESSION具有不同的值(总共大约3个不同的数组),就好像我在刷新页面之间浏览网站一样(不是).

When I refresh that test.php, the $_SESSION has different values (about 3 different arrays in total), as if I was browsing the site in between refreshing the page (I'm not).

回显session_id()不会输出任何内容.

Echo'ing session_id() doesn't output anything.

有什么想法吗?这完全弄乱了我对整个网站的会话/身份验证的处理.

Any ideas? This is completely messing up my handling of sessions/authentication throughout my site.

更新:我正在使用RackSpace Cloud站点进行托管

Update: I'm using RackSpace Cloud Sites for hosting

推荐答案

Rackspace需要不同的PHP会话处理程序: http://www.rackspace.com/knowledge_center/article/php-sessions-state服务器在云站点上以及如何修复非工作的PHP会话

Rackspace requires a different PHP session handler: http://www.rackspace.com/knowledge_center/article/php-sessions-state-servers-on-cloud-sites-and-how-to-fix-non-working-php-sessions

这篇关于被PHP会话问题所迷惑(Rackspace)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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