* 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();
> 
> // 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 "bar"?! This
> doesn't seem right? If that is the intended behavior, is there anyway to
> avoid this (perhaps a php.ini directive)? It was a nightmare finding out why
> my session variables values were being changed by like-named global
> variables ;-) Hey PHP still rocks though, later

----
php4-3.3RC1
Apache 1.3
register_globals: off
----
Hm.. I can't reproduce that, what are you're php settings that
affect session stuff, and your register_globals setting?

My guess is that you have a session_register('foo') somewhere.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to