I am creating a main hub using Yii2 as a base, my goal is to ask users to login into the Yii2 app and store a session into a certain folder. Then inside the Yii2 app there will be links into older Yii1 apps that use stored session in a folder.
I have successfully made both apps start to store sessions into a specific folder in C://sessions but to no avail i couldn't get the Yii1 app to recognize the session that the Yii2 app has created.
My question is how do i allow auto login into the Yii1 app after the user has logged into the Yii2 app?
The configs below have not been successful as i cant seem to get the Yii1 app to recognize the session created by the Yii2 app. Is it even possible for them to share the same session?
Any help is greatly appreciated.
Yii2 - web.php
'components' => [
'session'=>[
'class'=>'yii\web\Session',
'savePath'=>"C:\sessions", //change session path
'timeout' => 600,
'cookieParams'=>[
'domain' => $_SERVER['HTTP_HOST'],
'expire' => 600
],
],
Yii1 - main.php
'components'=>array(
'session'=>array(
'class'=>'CHttpSession',
'savePath'=>"C:\sessions", //change session path
'cookieMode'=>'allow',
'timeout' => 600,
'cookieParams'=>array(
'domain' => $_SERVER['HTTP_HOST'],
'expire' => 600
),
),