drep94225 2016-07-04 07:22
浏览 37
已采纳

Laravel会话在另一个选项卡中重置GET请求

I'm having trouble with Laravel sessions.

I can't seem to get Laravel session data to work.

  1. Open 2 tabs with different pages on my project
  2. Clear session data
  3. Reload tab 1 and all session data (errors) are fine
  4. Reload tab 2 (Simple GET request)
  5. Return to tab 1 and no errors are getting displayed anymore no matter how many times I try.

I use Laravel Framework version 5.2.39.

Routes are in "web" middleware group by default.

Session directory has 777 rights.

I have checked almost every Google result regarding this issue.

Update:

I have found out that if I change 'encrypt' => true, to 'encrypt' => false, in config/session.php it works as intended..

Any ideas why is this happening?

  • 写回答

1条回答 默认 最新

  • douju4278 2016-07-04 10:54
    关注

    Solved it!

    As told by @BindeshPandya SESSION_DRIVER had to be set to file..

    I thought I did that long ago, but my .env had "cookie" value.. Silly me

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?