|
Posted by Captain Paralytic on 01/14/08 16:14
On 14 Jan, 09:59, Jonas Werres <jo...@example.org> wrote:
> Kurda Yon wrote:
> > Hi,
>
> > As you have recommended I did not use the session_register(). In one
> > file I have executed such line:
> > $_session['ex'] = 2.0;
>
> > Then, in another file, I have executed the following line:
> > $ex = 3.0.
>
> > And than I have noticed that the previous assignment is seen
> > everywhere (on other pages). So, as far as I understood, after the
> > usage of $_session['ex'] = 2.0, the $ex variable becomes a session
> > variable. Moreover, $ex and
> > $_session['ex'] variables are the same variable! In other words, I
> > have to call $_session['ex'] just the first time. After I did it once
> > I can use just $ex (instead of $_session['ex']). Is that true?
> What the hell is going on here!?!
>
> Anyway... This happens, when register_globals
> (http://de.php.net/register_globals) is active (see first comment), which
> is also a sure sign, that you should really change your hoster because of
> incompetence.
> At least, you should manually turn it of either using .htaccess or ini_set()
> (latter one might not work, because GPC variables are registered before
> ini_set() is executed. I'm too lazy to consult the manual, do it yourself)
>
> Note, that this will force you to use the $_POST/$_GET/$_REQUEST arrays,
> although you should REALLY do that any.
>
Please do not top post.
Navigation:
[Reply to this message]
|