CodeIgniter Forums
Sessions across two, or more, sites - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: Sessions across two, or more, sites (/thread-40915.html)



Sessions across two, or more, sites - El Forum - 04-22-2011

[eluser]DephNet[Paul][/eluser]
Hi Guys,

I am developing a couple of applications, that will be on different sub domains under the main domain, and was wondering if sessions, using the CI session library, can span more than one sub domain, say my.domain.tld, forums.domain.tld and status.domain.tld?

--Paul


Sessions across two, or more, sites - El Forum - 04-22-2011

[eluser]bubbafoley[/eluser]
that shouldn't be a problem as long you set your cookie domain to '.domain.tld' in config.php

Code:
$config['cookie_domain']    = ".domain.tld";