Bug #14566 Updated: Session variables become read only
ID: 14566
User updated by: dward@maidencreek.com
Reported By: dward@maidencreek.com
Old Status: Feedback
Status: Open
Bug Type: Session related
Operating System: Solaris 7
PHP Version: 4.1.0
New Comment:
register_globals is on.
I have been trying to narrow everything down to a simple test case, but have not yet been able to.
It now appears that something acts differently in 4.1.0 that changes the reference of the global
variable to something different than the HTTP_SESSION_VARS[] variable which did not do so in 4.0.6.
A workaround is to set HTTP_SESSION_VARS[varname] =& GLOBALS[varname] before the end of the
script.
Previous Comments:
------------------------------------------------------------------------
[2001-12-17 15:55:08] derick@php.net
Can you post your script, and tell use the settings of register_globals?
Derick
------------------------------------------------------------------------
[2001-12-17 15:47:43] dward@maidencreek.com
In PHP 4.1.0 it seems that session variables can only be set once and will not be updated from
subsequent pages (when using a user save_handler at least). The same code works fine in PHP 4.0.6.
It seems that the write handler registered with session_set_save_handler() gets the same session
data that was read with the read handler except that newly set session variables get added.
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=14566&edit=1
Thread (7 messages)