-1

I'm just installed a fresh L5 app. I'm attempting to use database driven sessions however a new session appears to be created on each page load.

Has anyone come across this issue and managed to resolve?

"_token" value is new on each refresh.

I'm happy that the cookies have been configured correctly.

Not sure where to look next.

Any suggestions would be a huge help.

Thanks in advance

  • Possible duplicate of [My Laravel 5.2.10 Sessions wont persist](http://stackoverflow.com/questions/34958607/my-laravel-5-2-10-sessions-wont-persist) – Jon Taylor Nov 07 '16 at 19:27

1 Answers1

0

Have you ensured your session domain is set correctly? Your session domain should be the domain alone, for example domain.com, no URIs or protocols (http://), etc.

You may also want to check that SESSION_HTTPS is set to false, unless you're accessing your site over https.

If either are not set correctly sessions will not be correctly stored by the browser, so each request results in a new session.

The _token key will always be a new value for each request, this is part of the CSRF security feature.

Wader
  • 9,427
  • 1
  • 34
  • 38
  • Thanks for the answer. https is set to false and session domain is correct. A new $sessionId is generation on each page load. Cannot work out why :-( – Paul Fry Mar 09 '15 at 17:49