Laravel: TokenMismatchException

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

Things that you need to know:

  • cucumber tests on docker won't fire at the integration-test phase
  • Unable to connect to dockerized redis instance from outside docker
  • Kubernetes NFS server is taking 100% cpu
  • Execute command in linked docker container
  • Installing an application into a docker containers through SSH
  • List volumes of Docker container
    • 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!

  • Tilde Expansion Doesn't Work in Docker COPY Command
  • Duplicate mappings when building docker package using sbt-native-packager
  • Docker mount namespace
  • Docker - logging to Graylog2 container with GELF log-driver raises an error
  • Wifi connection dropped after docker start
  • 'aws configure' in docker container will not use environment variables or config files
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.