Replies: 5 comments 13 replies
-
Do any other routes work? I suspect you are using a webserver and it is not configured properly. Have you tried using And while it is not related, why do you have HEAD as a method? Leave the method specification out until you get it to work. Then if you really feel you need to specify then use GET and POST. |
Beta Was this translation helpful? Give feedback.
-
Can you share the failing code ? |
Beta Was this translation helpful? Give feedback.
-
I got similar issue after setting up project Symfony 5.4 + Docker. Does anyone know the cause? |
Beta Was this translation helpful? Give feedback.
-
You must require:
After that just change FollowSymLinks to SymLinksIfOwnerMatch ... and "vu à la" ... This package reconfigure Your code for Apache web-server ... |
Beta Was this translation helpful? Give feedback.
-
I think you import Route like that : |
Beta Was this translation helpful? Give feedback.
-
I've been following a guide on the official Symfony site, for setting up users via the bundle symfonycasts/verify-email-bundle, and the make:user and make:registration_form commands.
Everything is fine, the Symfony default page is displayed, but in the guide it says "go to /register" in the browser, and when I do so, I get
After clearing the cache and checking the routes, I do see the route as available, and when I issue a route match command with "php bin/console router:match /register" I get this output:
So, everything looks fine. Additional notes...I'm using Symfony 6.0, and PHP8 with attributes, so my route function has this header:
#[Route(path: '/register', name: 'app_register', methods: ['GET', 'HEAD'])]
...but as I wasn't getting anywhere, I also added this in my routes.yaml file
But still, I get the exception when trying to navigate to that page. I've tried switching to an annotation header in the code, but still the same issue.
Before I start debugging the issue in depth I was wondering if anyone had a similar issue or knows the reason.
Thank you SO much for any help!
Beta Was this translation helpful? Give feedback.
All reactions