Thanks for your reply, Steve. I have created app/app_controller.php
with the following content:

<?php
class AppError extends ErrorHandler {
  function error500($params) {
    header('HTTP/1.1 500 Internal Server Error');
    $this->_outputMessage('error500');
  }
}
?>

But it still doesn't work, although the AppError handler is taken into
account: when placing a die("hello"); into the error500() method, then
having DEBUG set to 2 displays "hello", but DEBUG set to 0 displays
the old "Not found" error message... What am I missing?

On Tue, Jan 25, 2011 at 5:50 PM, Steve <[email protected]> wrote:
> I think you need to provide a appError class. The default code turns off
> the error routing when you disable DEBUG ( set it to 0 ) so it looks for
> a URL which your server is correctly reporting the absence of.
>
> http://book.cakephp.org/view/154/Error-Handling
>
>
> On Tue, 2011-01-25 at 08:21 -0800, psybear83 wrote:
>> Hey everybody
>>
>> When having DEBUG set to 2 (or 1), my sweet little error500 is shown
>> correctly.
>>
>> SomeController extends AppController {
>>       function _error500() {
>>         $this->cakeError('error500');
>>         exit;
>>       }
>> }
>>
>> But when it's set to 0, then I'm just getting a plain "Error: The
>> requested address 'xxx' was not found on this server."
>>
>> Any idea what's going (wr)on(g)? Please give me a hint - as soon as
>> this is working my website is ready for being released in beta-
>> testing. :-)
>>
>> Thanks
>> Josh
>>
>
>
> --
> Our newest site for the community: CakePHP Video Tutorials 
> http://tv.cakephp.org
> Check out the new CakePHP Questions site http://ask.cakephp.org and help 
> others with their CakePHP related questions.
>
>
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group at 
> http://groups.google.com/group/cake-php
>

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to