Re: HELP, problems with sessions.....

From: Date: Wed, 09 May 2001 15:49:05 +0000
Subject: Re: HELP, problems with sessions.....
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-52123@lists.php.net to get a copy of this message
On Wed, May 09, 2001 at 09:30:27AM -0600, Johnson, Kirk wrote: > You should not have to call session_encode() to get sessions to work. Make uhm, i used session_encode to print out the things for debugging.... > session_start(); the first line on each page where you want to use session > variables. Use session_register() on each variable you want to be a session that's what i do.... > variable. If you still have problems, please post your code so we can look > for bugs. Good luck! uhm, the problem is that the code works on one machine but not on another one, so i suppose its a setup problem and not a coding problem.... but here that's whats not going: <? session_start(); if(!isset($HTTP_SESSION_VARS["toto"])) { echo " hell no toto defined!!!!"; session_register("toto"); $HTTP_SESSION_VARS["toto"] = "hello"; }//if(!isset($HTTP_SESSION_VARS["toto"])) else echo " toto was set to:'".$HTTP_SESSION_VARS["toto"]."'<BR>"; ... rest of the page that has nothing to do with this session ... echo "<HR>\nsession:"; echo session_encode(); echo "<P>debug, after the run: num of sess vars:".count($HTTP_SESSION_VARS)."<BR>\n"; reset ($HTTP_SESSION_VARS); while (list ($key, $val) = each ($HTTP_SESSION_VARS )) { echo "Sesvar '$key' = '$val'<BR>\n"; }//while (list ($key, $val) = each ($HTTP_SESSION_VARS ) ?> this is basicly what i have, and that is working on one machine and not on another.... -- ciao bboett ============================================================== bboett@earthling.net http://inforezo.u-strasbg.fr/~bboett http://erm1.u-strasbg.fr/~bboett =============================================================== the total amount of intelligence on earth is constant. human population is growing....

« previous php.general (#52123) next »