I\'ve hade some experience with session variables after upgrading to php 4.1.2.
I have found that PHPSESSID variable is not visible to scripts residing in a subdir to $DOCUMENT_ROOT the second time they reload.
After some research I have found that if you put setcookie(\"PHPSESSID\",$PHPSESSID); immediately after you restart the session the session variables will work fine everytime the page reloads.
Php scripts residing directly under $DOCUMENT_ROOT doesn\'t need this \"fix\" to handle sessions correctly.
If it sounds crazy.. Feel free to try my \"research\" scripts.
start with http://ut.telge.kth.se/n.php and reload once. PHPSESSID cookie should be set. Go to http://ut.telge.kth.se/mboard2/n.php and you should have the same PHPSESSID value. Press reload and PHPSESSID will be cleared for some odd reason. Close the browser and open a new one. Go to http://ut.telge.kth.se/n.php and press reload to see the session id again. Now go to http://ut.telge.kth.se/mboard2/n2.php. No matter how many times you press reload the PHPSESSID should remain the same.
Can someone explain why this happens? Worked fine before 4.1.2 without this \"fix\".
/C