0

I have a team who are developing a Laravel app. We are at the early stages so almost no code has been written. One of my teammates ran the ‘php artisan make:auth’ command on his branch to activate authentication which worked fine and continues to work on their machine.

Once I did a checkout on this branch however, I would attempt to login and would get a “419-page expired” error in spite of it working on my team mates machine. After some research I found that there is no cookie being saved for the session. Instead, each time a page request is made, a new file is created in storage/frameworks/sessions.

My project has the following details:

  1. storage folder has correct permissions to read and write
  2. All csrf tokens are in place in the auth files.
  3. Session.php hasn’t been touched from the default

Any suggestions about what could cause this would be much appreciated.

1 Answers1

0

We had the same issue. Check all files for extra chars before php opening tag, especially for invisible one. In our case the reason was in invisible symbol (UTF BOM) in one of config files. Notepad++ and PHPStorm do not show it! We can detect it only with FAR editor! PHP and Laravel show no warnings about it (it is strange), but http response header with cookies is broken.

prkv
  • 1