Reputation: 1259
I want to use cookies & sessions across sub domains. Im strictly using yii architecture. So I did this in cofig.php
'session' => array(
'cookieMode' => 'allow',
'cookieParams' => array(
'path' => '/',
//'domain' => '.mydomain.co',
'httpOnly' => true,
),
),
I'm getting the cookies across sub domains but not sessions.
Upvotes: 2
Views: 1401
Reputation: 4860
you need to set some PHP/Apache configuration for that.
please add below code at top of file.
ini_set("session.cookie_domain", ".domain.com");
replace domain.com with your domain.
Upvotes: 3