I have recently started a project where sessioning is being used to track visitors/store information etc... While programming, I have ran into several debugging scenarios. While surfing the net I found a piece of code that spits out sessions vars but fails on my testing environment.
When I run this sample, I get back the following:
echo "<b>SESSION Variables from \$HTTP_SESSION_VARS</b><br><br>";
reset($HTTP_SESSION_VARS);
while (list ($key, $val) = each ($HTTP_SESSION_VARS)) {
print $key . " = " . $val . "<br>";
}
Warning: Variable passed to reset() is not an array or object in /home/www/zeropaid/jorge/test/session_info.php on line 41
Warning: Variable passed to each() is not an array or object in /home/www/zeropaid/jorge/test/session_info.php on line 42
My initial thought is that I have empty sessions vars, I am incorrect. I can login in as "user" and authenticate against my UserTable.