Support the ongoing development of Laravel.io →
posted 11 years ago
Session

Hey,

I currently have the problem, that my users are getting logged out randomly after a couple of minutes, regardless if they have set a remember-me cookie or not.

session.php:

'driver' => 'database',
'lifetime' => 120,
'expire_on_close' => false,
'cookie' => 'kurtsession',
'path' => '/',
'domain' => '.my-domain.com', // Domain edited for security reasons

phpinfo() says:

session.cache_expire 180
session.cookie_lifetime 0
session.gc_divisor 100
session.gc_maxlifetime 1440
session.gc_probability 1

I don't know what is going wrong and I don't know how to debug this.

So if you have any hints, please reply.

Thanks, dschu

Last updated 3 years ago.

andrewcam liked this thread

1

First, check that you didn't leave any code (from testing maybe) that can log out the user. Also, does the user gets logged out after 2 minutes of being not active?, because that is normal behavior.

Last updated 3 years ago.
0

I had the same problem, it was problem with the session file system i switched to memcached and the problem has been solve for me

Last updated 3 years ago.
0

@Ruk33: Why are 2 minutes of not being active normal behavior? It is set to 120. But the comments (in session.php) are saying, that this is the time in MINUTES and if I take a look at the Cookie Tab in Firebug, the Session expires after 120 minutes.

@fenos: I'm using the database driver. We don't have memcached on our deployment server.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

dschu-lab dschu-lab Joined 20 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.