Laravel: TokenMismatchException

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

Things that you need to know:

  • How to wait a ResultCallback from DockerClient.waitContainerCmd()?
  • How to disable password login through ssh for root, while allowing certificate based login
  • docker-registry disk full and no ideas to diet it
  • How to replace memswap_limit in docker compose 3?
  • Running RC2 project on defined port
  • Failed Installation of Docker plugin for Intellij Idea CE 2016.1 due to <required plugin “org.jetbrains.plugins.remote-run” not installed.>
    • 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!

  • Restart docker with different environment variable
  • How to play a docker run --rm with docker-java?
  • Running Rails App in Docker Container using Non-Default Port
  • DC/OS on top of a docker container cluster
  • Play Framework app in Docker is not working
  • Vagrant Error in Centos
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.