Session troubles when used on BT hosting
Posted
by YsoL8
on Stack Overflow
See other posts from Stack Overflow
or by YsoL8
Published on 2010-06-14T09:25:31Z
Indexed on
2010/06/14
9:52 UTC
Read the original article
Hit count: 246
Hello
I have developed a site for a client with a pre-existing BT hosting package. Since going live there has been a problem where $_session loses it's data between pages. I have previously fixed the problem, but somehow it has become unfixed.
Last time this problem happened, my research indicated that there is something funny with BT's setup when using sessions, and that article provided this code:
if(ini_get('register_globals') == 1)
if(is_array($_SESSION))
foreach(array_keys($_SESSION) as $var_to_kill)
unset($$var_to_kill);
Which even though it looks broken to me, did in fact reduce the problem to a very low level. (i.e one drop out a day).
However, today my client is in touch again and surprise surprise, the problem is back.
Does anyone know of a solution? (My client has already stated they will not change hosts!)
Oliver
© Stack Overflow or respective owner