CakePHP 2.0 501 Not implemented error on form submission – Fix

Yesterday I was found strange issue with my new cake project. It was running great in local machine windows as well Linux machine. Developer has moved them to live sever with CentOs 5.8. After a few minutes I got call from Client representative that “Nothing is working”. Then I go through it and finally realized that there is an issues in add action of a major module. I was checking submitting by form many times. Issues are keeping on coming and are very strange too. Because form was just one input (select) and submit button. I was checked the security module, even after disabling it, we are getting same issues.


Finally after a huge research and checking, I found that issue was came from silly mistake. It was come because, we have missed form end tag { $this->Html->end() }.  Yes, as per cake 2.0 + it’s is mandatory to add this to end the form.

This is why I love in cake php than other frameworks, because cake is strict in what is, we must follow it. Also it is always have only one way to implement one thing. May be it’s is little harder to learn, But it will follow same standards in all areas. So once we learn basic we can easily assume how similar modules works.

Subin George