Hey folks, I’m running into an issue with my Yii2 Advanced project. I used kartik-v’s template, but when I log into the frontend, I also get logged into the backend. I attempted to assign unique session names and change the savePath in both the frontend and backend configurations, yet I receive a 500 internal server error when accessing the page. Without the savePath, the error disappears, but the login still isn’t working as expected. If I use the ‘remember me’ option, I get an error message even though the login appears to succeed.
// Backend Configuration
'components' => [
'session' => [
'name' => 'backend_session',
'savePath' => __DIR__ . '/../temp',
],
'user' => [
'identityClass' => 'common\models\BackendUser',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_backendIdentity',
'path' => '/project/backend/web'
]
],
],
// Frontend Configuration
'components' => [
'session' => [
'name' => 'frontend_session',
'savePath' => __DIR__ . '/../temp',
],
'user' => [
'identityClass' => 'common\models\FrontendUser',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_frontendIdentity',
'path' => '/project'
]
],
]