Home > Custom Error > Custom Error Pages Kohana 3.2

Custom Error Pages Kohana 3.2

Would be greatly appreciated! Unfortunately, i currently doing an update in Kohana 3.2 and this doesn't work. lysender says: March 28, 2011 at 12:55 pm @Wariston - It means that some part of your Exception handler is throwing an Exception. I'm sure many will find this very useful. this contact form

echo Request::factory(Route::get('error')->uri($attributes))->execute()->send_headers()->body(); } catch(Exception $e) { // Clean the output buffer if one exists ob_get_level() and ob_clean(); // Display the exception text echo parent::text($e); // Exit with an error status exit(1); I hope maybe there's an easy way i missed, because i'm starting to thing i should not chose this framework at all if such basic tings are so hard to setup. thank you Chris Chubb says: March 17, 2011 at 1:04 am Lysender, Your code samples have helped me out quite a bit, but I am running into some issues. Note: We can also use HMVC to issue a sub-request to another page rather than generating the Response in the HTTP_Exception itself. have a peek here

Education or employment: What is a post-doc? If using the example above, be sure *404.php* exists under */application/views/error/*. lysender says: May 1, 2011 at 10:04 pm Hi P, Funny!

share|improve this answer answered May 12 '11 at 15:36 Lethargy 1,4391013 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign Do more numbers from 1 to 10000 inclusive have an even or odd sum of their digits? asked 5 years ago viewed 4956 times active 4 years ago Upcoming Events 2016 Community Moderator Election ends in 3 days Linked 0 custom error page - can't get into handler Is this worth adding to this excellent tutorial?

Name Mail Website Categories Blender (2) Electronics (21) General (1) Pure Data (16) Recipe (4) Software (7) Web (5) The best thing would be to make a pull request on github if you want to contribute your code. share|improve this answer edited Sep 16 '11 at 10:01 answered Sep 16 '11 at 9:54 Luwe 2,3931020 No still not working. –jnbdz Sep 16 '11 at 16:36 http://forum.kohanaframework.org/discussion/11112/custom-error-page-troubles/p1 mrbrownisintown September 2012 Can anybody help me on this one?

For each HTTP_Exception class we can individually override the generation of the Response instance. echo Request::factory(Route::url('error', $attributes)) ->execute() ->send_headers() ->response; } } } kohana.php:

Nevermind. http://stackoverflow.com/questions/4463862/how-to-setup-a-custom-404-page-for-a-kohana-v3-app This allows the // webmaster to find broken links and update them in a shorter amount of time. Regards glt buckthorn says: June 11, 2011 at 4:26 am Thank you for this, Lysender -- for both the 3.0 and 3.1 versions (hope they don't change it again for a Thanks for the visit.

And yes, it must be 404.php. weblink How might a government pass a law without the population knowing? Personal Open source Business Explore Sign up Sign in Pricing Blog Support Search GitHub This repository Watch 1 Star 0 Fork 0 Svish/kohana-error-handler Code Issues 0 Pull requests 0 Projects And oh, I haven't tried setting the base url other than root or a sub directory and also that HTTPS stuff.

An Improved Exception Handler 2. We will trace the cause of this problem.

For the mean time, you may want to go to the main page.

If you wanted to go Route::set('error', 'error/(/, )', array('action' => '[0-9]++', 'message' => '.+')) ->defaults(array( 'controller' => 'error' )); pocesar September 2012 Route::set('error', 'error(/(/))', array('action' => '[0-9]++', 'message' => '.+')) ->defaults(array( 'controller' => 'error', 'action' => navigate here Browse other questions tagged php exception-handling kohana kohana-3.2 or ask your own question.

Request::curent()->is_initial() That's more elegant I think. Thanks for sharing, I haven't really dig deeper with the 3.1 since I'm waiting for Sprig to be updated to it. Does changing Kohana::DEVELOPMENT === Kohana::$environment to Kohana::DEVELOPMENT !== Kohana::$environment show the custom error page? –Luwe Sep 16 '11 at 17:09 Nop it does not change anything. –jnbdz Sep 16

http://blog.lysender.com/2011/02/kohana-3-1-migration-custom-error-pages/ <-- i followed this tutorial and everything went smoothly the error is being detected the exception is being handled but there has been an exception that i cant seem to

But it didn't work. I followed the tutorial on the kohana guide page (http://kohanaframework.org/3.2/guide/kohana/tutorials/error-pages) but somehow It's not working as I expect. For example, in case of typos or wrong php syntax I receive standart Konaha_Exception message, even in production O_o. Thanks for the project. psc # 11.25.2011 11:56 5 Hi Robert, You're right, I forgot to add the "reset_token" field in "users".

If you simply set a status of, for example, 404 via Respose::status the custom page will not be used. what could be the real problem? These variables are then available to our * controllers if they need to be modified. */ public function before() { parent::before(); his comment is here Where should I add the and ,?