Why i cannot set this key into $_SESSION?
i have the following question. I use a network script (social engine) for my little homepage. When i am logged in, it sets the default $_SESSION keys below:
array(
['__default'] =>
array(
['session.counter'] => 7
['session.timer.start'] => 1314860302
['session.timer.now'] => 1314860677
['user_email'] => '740dc176ae3c650327f94ab327916c07'
['user_pass'] => '3486851c47c9e92c72725a1046d87288'
['user_persist'] => FALSE
['user_id'] => 2
)
['user_id'] =>
['user_id2'] => 3
)
I program on my Windows machine (xampp) there i have no problem to do sth. like this $_SESSION['user_id'] = 2;
I know, normally i should not use the same key even though it is not in the same layer, but i used it... (next time i will not)
I would like to understand why on the online vserver (linux) with the same files, $_SESSION['user_id'] =>
is always empty. I can never set it. Setting sth. like $_SESSION['user_id2'] = 3;
is no problem (ok is another key).
I really do not have any clue why. Sadly the admin there also do not have an idea to solve this.
Is there a setting in the php config or sth. i must activate to get the same behavior on both machines?
I would appreciate any help. Thank you
ruvenm
Ok i found the solution. register_globals is on for the vserver. After deactivating it, it 开发者_StackOverflow中文版works. Thought this setting will be deprecated?
Search your sources for user_id
and $_SESSION['user_id']
, they may be used elsewhere.
精彩评论