background preloader

Articles

Facebook Twitter

Kohana 3.1 Migration – Custom Error Pages | Lysender's Daily Log Book. Kohana 3.1 has been released few days ago and it is time to upgrade all my Kohana based application / websites. To make it simple, I have upgraded first my portfolio site and so far, only the custom 404 page and page caching are affected. UPDATE: support for base url other than “/” Due to several issues about 404 pages using base url other than “/”, I have updated the post to reflect those enhancement/fix. It was due to the fact that Route::url() adds the base url whereas Route::get() doesn’t. For kohana setup using a non-root (“/”) base url, extra url segment will throw more errors on 404 pages. Thanks to glt and the Kohana guys on the forum. Here is the comment… Custom Error Pages for Kohana 3.1 Since the documentation for Custom Error Pages for Kohana 3.1 is still incomplete or simply I don’t like, I have modified it and created something that fits my needs.

Note: The Kohana documentation may have been improved a lot but I haven’t checked it out lately. Setting up .htaccess Error views. Doctrine Session Driver for Kohana 3 [Updated Feb 21 2011] | Flynsarmy. Deploying Kohana 3.2 application in production. Kohana, Formo and many-to-many relations (“habtm”) « Cambiatablog. Kohana And AJAX (Sitting In A Tree) • Return True. This is my first in a line of tutorials based on Kohana PHP Framework. This first tutorial is based on how to use Kohana in conjunction with AJAX. Some people have had some trouble with it, as did I when I first used it, so here are the basics. I’m assuming you know how to set up kohana & have a project set up with a new controller.

All you need to do is create a new method in your controller. That is a basic Kohana controller (in this case an extention of the Template Controller). There is an exceptionally simple way to do this, as mentioned by Thomas in his comment. This runs a check for the HTTP header HTTP_X_REQUESTED_WITH and makes sure it equals xmlhttprequest. There is one problem with any HTTP header check & that is that HTTP headers can be faked.