I have two projects running in the same shared hosting (Namecheap Reseller hosting), have SSH access. Laravel version is 5.4. In both projects, using database
driver for session
and cache
. I have changed the cookie name for both projects. But I am facing two serious problems.
- It automatically logged out authenticated users after a few minutes.
- There is a blog part of it. If an authenticated user posts something, it showing another authenticated user posted it.
session.php (thefinancialexpress.com.bd)
<?php
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => 120,
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'store' => null,
'lottery' => [2, 100],
'cookie' => 'fe_online',
'path' => '/',
'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', false),
'http_only' => true,
];
.env (thefinancialexpress.com.bd)
BROADCAST_DRIVER=log
CACHE_DRIVER=database
SESSION_SECURE_COOKIE=true
SESSION_DRIVER=database
QUEUE_DRIVER=sync
session.php (today.thefinancialexpress.com.bd)
<?php
return [
'driver' => env('SESSION_DRIVER', 'file'),
'lifetime' => 120,
'expire_on_close' => false,
'encrypt' => false,
'files' => storage_path('framework/sessions'),
'connection' => null,
'table' => 'sessions',
'store' => null,
'lottery' => [2, 100],
'cookie' => 'laravel_session',
'path' => '/',
'domain' => env('SESSION_DOMAIN', null),
'secure' => env('SESSION_SECURE_COOKIE', false),
'http_only' => true,
];
.env (today.thefinancialexpress.com.bd)
CACHE_DRIVER=database
SESSION_DRIVER=database
QUEUE_DRIVER=sync
Please help me to solve this problem.
Thanks & Regards