Laravel: TokenMismatchException

I know about this exception but I can’t fix this issue.

Things that you need to know:

  • How to export a project from IBM Bluemix PaaS to anywhere else as a Docker?
  • Are docker images portable across different linux flavours?
  • Cannot connect to remote docker host via SSH forwarded domain socket
  • docker toolbox mount file on windows
  • How do I automate two layers of SSH plus a docker exec?
  • What's the default url that docker using when run `docker pull`?
    • I’m using PHP 5.6 FPM, Nginx, MariaDB;
    • I’m using Laravel 5.1.44;
    • My app is working on server and have no issues;
    • I’m in a new pc with docker. I lost my previous env and it was not installed using docker;
    • I’m trying to use docker. I tested a lot of containers for a Lemp stack and none of them is working(for this project);
    • Tested in home and at work(both using docker). Not working;
    • Now I’m using;
    • I downloaded a login test project from github and it works.
    • I don’t know, but it looks like a session issue cause when I disable csrf middleware, I try to login and the browser sends me back but it doesn’t render an alert that uses session;
    • But if I use “Session::put(‘test’, ‘bla’)” and “Session::all()”, ‘test’ is there.
    • I got this error in all forms;
    • I have csrf field in all forms;
    • I tried to change “session.save_path” in “php.ini” and it also does not work.

    And I don’t know what to do. It’s an issue that I can’t fix :/

    Any help? Something that I could try? Thank you!

    EDIT #1

    Right now I installed Nginx and PHP FPM using the same version that is in my docker containers and it’s working. I installed them in my host machine without docker.
    It’s not something that I like to do but it works and I can continue to dev my project.

    This issue is not fixed yet cause I still can not run my project in a docker container :/

    EDIT #2

    Before post this question here I tested redis and it also was not working.
    Today, I read your replies and I tried with database and it works.
    Then I changed to file and it also works now(I did a chmod 777 in storage folder). But yesterday I did this(chmod storage) too, it’s weird. And something strange that I notice is that when I reboot my pc, I always have to do a chmod in storage folder to my app works.

    But now, I have this “Redirecting to” when I have a redirect. Could be a space before a PHP open tag but is something that is not happening in my host machine(as I said in EDIT #1).

    I’ll try to fix this. Thank you guys!

  • Cayley docker isn't writing data
  • Docker: how to connect two bridges
  • Connection reset by peer @ io_fillbuf - fd:8 (HTTPClient::KeepAliveDisconnected)
  • DEIS no public IP's
  • How to dockerize a node.js talking to a local mongodb
  • Bind-mount a host directory into a volume of a running docker container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.