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

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Sessions across two, or more, sites (/showthread.php?tid=40915)



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";