Re: SESSION QUESTION

From: Date: Mon, 15 Jul 2002 08:15:27 +0000
Subject: Re: SESSION QUESTION
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-14765@lists.php.net to get a copy of this message
> Is there a bug in php4.2.1 dealing with sessions? I am using $_SESSION to > set my session variables and it will not work. Can anyone offer examples > that they have used that work? I am going insane. I had similar problem, so I realized that $_SESSION["name"]=value starts working after something like that (copied from PHP docs): // hack to enable SESSION - my comment if (!isset($HTTP_SESSION_VARS["count"])) $HTTP_SESSION_VARS["count"] = 0; else $HTTP_SESSION_VARS["count"]=$HTTP_SESSION_VARS["count"]+1; "count", however doesn't increment (funny?) but without above following line wouldn't work: $_SESSION["id"]=1; I asked few days ago why does it work this way, but nobody knew ("Session - funny or magic?"). I don't know also, but it works on my server, so you can try too.

« previous php.windows (#14765) next »