I am getting below error on live server:
request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException: "No route found for "GET user/create: Method Not Allowed (Allow: POST)" at /home/public_html/project/app/cache/prod/classes.php line 3685
but I am not getting this error on a local machine with the same code.
Solutions points to clearing the cache, but I am not able to get how we can clear cache on a live server.
I also deleted cache folder from live server, but the issue still persists.
UPDATE: The issue is surprisingly solved after updating base.html.twig file. i think cache regenerates again with some dependencies after that. but still i did not get how it is resolved as deleting cache folder does not resolved it but changes in base.html.twig file does the job.
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 :
Otherwise, delete app/cache folder.
Try
If problem solved, read more in "Setting up Permissions" section: http://symfony.com/doc/current/book/installation.html
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.