On my old webhost, wordpress was in a subdirectory, and everything worked fine. On my new webhost (hostgator), wordpress is installed in the root directory, and now this code outputs bool(false) even when I am signed in when placed in a php file, also in the root directory.
require "wp-blog-header.php"; var_dump( is_user_logged_in());
What is different? What is going on?