hi all, i feel bad posting an question since i havent been on the forum in a long time, but this one is really starting to irritate me. im trying to run an open source webmail client called squirrelmail and the session doesnt seem to be saving data correctly. here are some code snippets and then ill explain the problem:
redirect.php:
webmail.php:
is_logged_in() checks for a registered session variable 'user_is_logged_in' the other stuff is basically to test the version of php and test the correct var (according the setting of register_globals). so ive tried the scripts with register_globals=on (even though its look pretty compatible w/o, like in the above function) ive tried session.auto_start = 1 & 0, and lastly i checked the session array manually. before the call to write and close the session the array prints out as expected with all vars registered. but in webmail.php if i print the array i get nothing. i moved the session_start() call before the includes because i read that could cause problems, but it didnt do anything for me. the session does start with the correct name, but simply prints an empty array. ive scoured the net for solutions and havent come up with anything that i havent already tried. any suggestions?
what we see depends mainly on what we're looking for.
--John Lubbock
redirect.php:
Code:
//lots of code registering session vars,etc
session_write_close();
header("Location: webmail.php");
webmail.php:
Code:
session_start();
//bunch of includes,etc
is_logged_in();
is_logged_in() checks for a registered session variable 'user_is_logged_in' the other stuff is basically to test the version of php and test the correct var (according the setting of register_globals). so ive tried the scripts with register_globals=on (even though its look pretty compatible w/o, like in the above function) ive tried session.auto_start = 1 & 0, and lastly i checked the session array manually. before the call to write and close the session the array prints out as expected with all vars registered. but in webmail.php if i print the array i get nothing. i moved the session_start() call before the includes because i read that could cause problems, but it didnt do anything for me. the session does start with the correct name, but simply prints an empty array. ive scoured the net for solutions and havent come up with anything that i havent already tried. any suggestions?
what we see depends mainly on what we're looking for.
--John Lubbock