joshmaker Posted February 2, 2007 Share Posted February 2, 2007 I am trying to move a website I built onto a Windows 2003 server, however, the session variables don't seem to be working correctly. Here is the first test page I created: <?php session_start(); session_register("level"); $_SESSION["level"] = 42; print 'Session: '.$_SESSION["level"]; ?> <br /> <a href="sessiontest.php">session test</a> The page prints out "Session: 42". Here is the code for the link: <?php session_start(); print 'Session: '.$_SESSION["level"]; ?> This page prints out "Session: " -- for some reason the variable 'level' isn't being sent over. I've checked that session.auto_start = 0 in php.ini and now I am out of ideas. Anyone able to offer me any help? Link to comment https://forums.phpfreaks.com/topic/36820-solved-session-variables-not-passing-on-windows-server-2003/ Share on other sites More sharing options...
joshmaker Posted February 5, 2007 Author Share Posted February 5, 2007 I've tried it with and without "session_register("level");" as well as using "$HTTP_SESSION_VARS" instead of $_SESSION... still no luck getting sessions to work. Link to comment https://forums.phpfreaks.com/topic/36820-solved-session-variables-not-passing-on-windows-server-2003/#findComment-177647 Share on other sites More sharing options...
craygo Posted February 5, 2007 Share Posted February 5, 2007 Make sure you have the session folder set in your php.ini file. Ray Link to comment https://forums.phpfreaks.com/topic/36820-solved-session-variables-not-passing-on-windows-server-2003/#findComment-177649 Share on other sites More sharing options...
joshmaker Posted February 5, 2007 Author Share Posted February 5, 2007 Good suggestion -- I had the session folder set, but I needed to change the permissions on it Link to comment https://forums.phpfreaks.com/topic/36820-solved-session-variables-not-passing-on-windows-server-2003/#findComment-177668 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.