Re: register_globals odd behaviour?
| From: | Richard Lynch | Date: | Wed, 22 Aug 2001 00:12:36 +0000 |
| Subject: | Re: register_globals odd behaviour? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-63820@lists.php.net to get a copy of this message | ||
I think you should still use $count++
The array is just there for you to *READ* data, not to alter it.
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Sean C. McCarthy <smccarthy@sci-spain.com>
Newsgroups: php.general
To: PHP General List <php-general@lists.php.net>
Sent: Tuesday, August 21, 2001 1:00 AM
Subject: register_globals odd behaviour?
> Hi All,
>
> I just come across and odd behaviour with the register_globals and
> session handling. The problem is that when I set the register globals to
> on I cannot access the session_variables through the associative array
> HTTP_SESSION_VARS. The manual says explicitly that with track_vars and
> register_globals both on the array and the vars will point to the same.
>
> It just doesn't happen the vars are not written at the end of the
> script. I mean with register_globals ON:
>
> <?
> session_register("count");
> $HTTP_SESSION_VARS["count"]++;
> ?>
>
> this does not work. My php is PHP Version 4.0.3pl1 running on Linux
> 2.2.18 and Apache1.3.9 . Does this bogus behaviour happen with higher
> versions too?
>
> Thanks in advance.
>
> Sean C. McCarthy
> SCI, S.L. (www.sci-spain.com)