My guess is one server has register_globals on, the other has
register_globals off. Try this change in your code: instead of assigning a
value to $HTTP_SESSION_VARS["toto"], instead assign a value to $toto. You
will then see a value for $toto in the echo session_encode().
$HTTP_SESSION_VARS["toto"] and $toto are *not* the same variables while on
the current page.
The other way to approach it is to use an .htaccess file to turn
register_globals off but leave your code as it is below. Again, you will
then see a value for $toto in the echo session_encode().
Kirk
> -----Original Message-----
> 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....
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]