For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > November 2007 > Re: Wow, is it a bug? Session variable is lost if array with the









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Wow, is it a bug? Session variable is lost if array with the
Piotr Siudak

2007-11-27, 7:06 pm

alexandis@gmail.com pisze:
> $_SESSION["a"] = "XXXXX"; $a = array(); print_r($_SESSION["a"]);
> // it shows array()!!!
> If make $a as variable - $_SESSION["a"] preserves its value...
>
> p.s. PHP4


no it is not a bug.
but it has not not been default behaviour since 22-Apr-2002

search for register_globals in your php.ini



--
Piotr Siudak
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com