If you are using php artisan serv and host at localhost:8000 and switch between more that one project hosted by same domain localhost:8000, you should clear your browser cache and history every time you switch project or you can set different *.dev domain for each project
[5.3] TokenMismatchException in Laravel's auth form
Well, I have this issue: https://github.com/laravel/framework/issues/15040. Graham closed it so I have to ask here. Everthing is in the discussion. Can someone help me (and others)?
I think I figured that out. But the solution is quite odd and it is not related to the Csrf module. With many debugs and testing I found out that the key reason of this bug is another exception
file_put_contents(): Exclusive locks are not supported for this stream
So, I changed in laravel/framework/src/Illuminate/Filesystem/Filesystem.php line ~111 method put:
return file_put_contents($path, $contents, $lock ? LOCK_EX : 0);
to:
return file_put_contents($path, $contents, $lock ? LOCK_SH : 0);
(changed LOCK_EX to LOCK_SH)
And it works. I think my Vagrant machine has some bad configuration (I had problems with installation on my AMD computer) and that is the main factor of this whole issue. Shouldn't it be reported to Laravel's GitHub?
Please or to participate in this conversation.