register_global is currently on. The problem is, I am hacking into someone
else's (awful awful) code, and if I turned off register_globals, the whole
application would go kaput. I am not even using the old session_x functions,
just the new associative session array $_SESSION.
"Curt Zirzow" <[EMA
Yeah I figured as much. That sucks that they would both reference the same
location in memory even with globals on. Thanks alot for your help, ill
figure out a hack around the hack.
Christian Calloway
"Kirk Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Under 4.3.2, and re
Under 4.3.2, and register_globals on, $foo and $_SESSION["foo"] both contain
a reference that points to the same memory location. So, assigning to either
one effectively causes the same assignment in the other.
If you can't turn register_globals off, consider making a copy of $_SESSION
at the top
>
> session_start();
>
> // lets say this equals "bar" and it was set on a previous page
> $_SESSION["foo"];
>
> $foo = "rab";
>
>
> echo $_SESSION["foo"];
>
> ?>
>
> The problem is, when I set the global variable $foo="rab",
> when I echo the
> session variable $_SESSION["foo"], it output
* Thus wrote Christian Calloway ([EMAIL PROTECTED]):
> register_global is currently on. The problem is, I am hacking into someone
> else's (awful awful) code, and if I turned off register_globals, the whole
> application would go kaput. I am not even using the old session_x functions,
> just the ne
* Thus wrote Christian Calloway ([EMAIL PROTECTED]):
> Hey Everyone,
>
> I am running Apache 2.047 with PHP (as module) 4.3.2. I ran into something
> interesting and I wanted to know if it was a bug, or actually supposed to be
> that way. Given the following lines of code:
>
>
> session_start()
Hey Everyone,
I am running Apache 2.047 with PHP (as module) 4.3.2. I ran into something
interesting and I wanted to know if it was a bug, or actually supposed to be
that way. Given the following lines of code:
The problem is, when I set the global variable $foo="rab", when I echo the
session v
7 matches
Mail list logo