RE: [PHP] session bug or feature

2003-08-14 Thread Johnson, Kirk
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

Re: [PHP] session bug or feature

2003-08-14 Thread Christian Calloway
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 [EMAIL

RE: [PHP] session bug or feature

2003-08-14 Thread Johnson, Kirk
?php 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 outputs rab instead of

Re: [PHP] session bug or feature

2003-08-14 Thread Christian Calloway
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: [PHP] session bug or feature

2003-08-09 Thread Curt Zirzow
* 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 new

Re: [PHP] session bug or feature

2003-08-07 Thread Curt Zirzow
* 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: ?php session_start();