Check the register_globals setting in php.ini. It looks like it is "on" on the problem server. If so, then you have two choices: 1. Turn it "off" 2. Change your code to this style:
session_start(); $node = 10.2; session_register('node'); echo $node; Kirk > -----Original Message----- > From: Leston Drake [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 18, 2002 11:48 AM > To: [EMAIL PROTECTED] > Subject: [PHP] sessions trouble > > > Hello, > > I am unable to retrieve session variables on my local server. > I'm using some code like this to test it (thanks to Ed): > ------------------------------------------------------------------ > session_start(); > echo ":" . $_SESSION["node"] . "<br>"; > $_SESSION["node"] = "10.2"; > echo ":" . $_SESSION["node"] . "<br>"; > ------------------------------------------------------------------ > > Then there is an href link to the same document, to test > whether or not it > can see $_SESSION["node"] the next time. > It can't. > The output for both requests looks like this: > ------------------------------------------------------------------ > Warning: Undefined index: node in c:\program files\apache > group\apache\htdocs\test5.php on line 3 > : > :10.2 > > test > ------------------------------------------------------------------ > > On another server (http://www.lpsoftware.com/phptest/test5.php) it works as expected. But I can't figure out why it doesn't work here. I'm running WinME, Apache 1.3.2, Php 4.1.2 I have cookies enabled (actually prompted so I can 'see' it) for my browser. Is there some setting in php.ini that I need to change? BTW, being a php newbie I really appreciate the helpful people on this list! You're a great resource. TIA, Leston -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php