OK, I assume that you are using CI2 as you get FALSE in a non-existent var session. CI sessions use cookies and / or a database, depending on your configuration. What are the cookie settings in your configuration file?
You should pay attention to the following settings:
$config['cookie_prefix'] = ""; $config['cookie_domain'] = ""; $config['cookie_path'] = "/"; $config['cookie_secure'] = FALSE;
and these (the default configuration is shown in both cases):
$config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_expire_on_close'] = FALSE; $config['sess_encrypt_cookie'] = FALSE; $config['sess_use_database'] = FALSE; $config['sess_table_name'] = 'ci_sessions'; $config['sess_match_ip'] = FALSE; $config['sess_match_useragent'] = TRUE; $config['sess_time_to_update'] = 300;
Is your site hosted on a subdomain? cookies are set through the headers. is there any output generated before your cookies are set? set your log threshold to 2 so that you can see errors and debugging messages.
$config['log_threshold'] = 2;
Have you set the registration key?
$config['encryption_key'] = '[there-must-be-something-here]';
source share