Welcome Guest, Not a member yet? Register   Sign In
Subdomain Sessions
#6

[eluser]Unknown[/eluser]
I am running the native/DB hybrid Session library on CI 1.7.2. Manually adding one line to the library and updating my config.php file did the trick.

In the Session.php library, I changed what used to be lines 46 through 48 to:

// Sessions, start your engines!
ini_set("session.gc_maxlifetime", $this->sess_expiration);
ini_set("session.cookie_domain", $this->CI->config->item('cookie_domain'));
session_start();

And in my config.php file, I updated

$config['cookie_domain'] = "";

to
$config['cookie_domain'] = ".your-domain.com";

NOTE: Cookies will be shared between sub1.your-domain.com and sub2.your-domain.com with no problem. But you could run into an issue here with cookies being shared between dev.your-domain.com and live.your-domain.com


Messages In This Thread
Subdomain Sessions - by El Forum - 07-23-2007, 06:32 PM
Subdomain Sessions - by El Forum - 07-23-2007, 08:31 PM
Subdomain Sessions - by El Forum - 07-23-2007, 10:58 PM
Subdomain Sessions - by El Forum - 07-24-2007, 12:06 AM
Subdomain Sessions - by El Forum - 07-24-2007, 02:50 PM
Subdomain Sessions - by El Forum - 02-19-2011, 09:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB