There were many questions about how to split your own CI sessions between subdomains or domain and subdomain.
Just some of them: 1 , 2 , 3
Everyone says we should define $config['cookie_domain'] as follows
$config['cookie_domain'] = ".example.com";
It seems to be the correct answer, but ... the subdomain flushes data during the update (value $config['sess_time_to_update'] = 300; ) on both domains. After sess_time_to_update expires, all data is deleted.
Additional Information:
- CodeIgniter Ver. 2.1.4
- The subdomain and domain use the same files (alias).
- $ config ['sess_use_database'] = TRUE;
source share