Symfony2 MethodNotAllowedHttpException on live server

后端 未结 3 1205
一整个雨季
一整个雨季 2021-01-18 02:36

I am getting below error on live server:

request.ERROR: Uncaught PHP Exception Symfony\\Component\\HttpKernel\\Exception\\MethodNotAllowedHttpExcept

相关标签:
3条回答
  • 2021-01-18 02:55

    Try to run php app/console router:debug | grep user/create to check if this route loaded at all. Maybe you load this route only for specific env.

    0 讨论(0)
  • 2021-01-18 03:07

    Try

    rm -rf app/cache/*
    rm -rf app/logs/*
    
    chmod 777 app/cache/
    chmod 777 app/logs/
    

    If problem solved, read more in "Setting up Permissions" section: http://symfony.com/doc/current/book/installation.html

    0 讨论(0)
  • 2021-01-18 03:09

    It's because you have to call you route with "POST method. Try to remove @Method("POST") in you controller or Add GET with @Route("GET","POST"). Documentation

    Or try this following command :

    php app/console cache:clear -e prod
    

    Otherwise, delete app/cache folder.

    0 讨论(0)
提交回复
热议问题