I have multiple subdomains and i'm trying to use the sessions across subdomains.
http://example.com
http://subdomain.example.com
I have also set the cookie domain in config.php
$config['cookie_domain'] = ".example.com";
The session userdata and also flashdata are empty when used in the other domain. Im using the same session table as well for both CI instance
From the following solution : Sharing sessions
Both the cookie_domain and cookie prefix has to be set
$config['cookie_domain'] = ".example.com";
$config['cookie_prefix'] = "example_";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With