Confused by PHP session problem (Rackspace)

本小妞迷上赌 提交于 2019-12-24 02:50:22

问题


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);

?>

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).

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

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

Update: I'm using RackSpace Cloud Sites for hosting


回答1:


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



来源:https://stackoverflow.com/questions/3432235/confused-by-php-session-problem-rackspace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!