Re: Bug #14809: global session vars are being assigned by value, not reference

From: Date: Wed, 02 Jan 2002 23:38:10 +0000
Subject: Re: Bug #14809: global session vars are being assigned by value, not reference
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-75714@lists.php.net to get a copy of this message
Derick, did you finish to change session.xml?
Can I start working on the manual page so that users to
avoid common/known issues?

--
Yasuo Ohgaki

winterchild@pobox.com wrote:

From:             winterchild@pobox.com
Operating system: linux 2.4.7-10
PHP version:      4.1.1
PHP Bug Type:     Session related
Bug description: global session vars are being assigned by value, not reference hi This seems to be a problem with the way session variables register in 4.1.1 I have defined a session variable called $session thus: session_start();
                session_register("session");
                global $session;
                $session['profileName'] = "name";
This seems to work fine. On the next page I do: session_start(); global $session; echo "profileName=".$session['profileName']; (displays name) $session['profileName']="new name"; however, this doesn't seem to actually change the session variable, since on the next page if i echo $session['profileName'] it still shows 'name' instead of 'new name' I can modify the session var value using $_SESSION[session][profileName]="new name"; and then it works fine on the next page. The latter format worked with 4.0.5, i just installed 4.1.1 and now apparently I have to modify all my scripts.. Here is my config: './configure' '--with-mysql' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-track-vars=yes' register_globals is on. apache version is 1.3.20


Thread (5 messages)

« previous php.dev (#75714) next »