I think there's session_start(); missing in your code.
session_start();
Otherwise, you should try to do a print_r() to see if you missed something there. (or a var_dump() )