A header() only sends a header information to the browser, it does not stop the following php code from executing. Probably you should use a die() or exit() after the header! Enjoy, John
On Oct 9, 11:44 pm, Dewald Pretorius <dpr...@gmail.com> wrote: > Given the following scenario: > > a) In an app controller method you do a header redirect to an external > site (I did it directly with header() not with $this->redirect). > > b) Since there's no view output, no ctp file exists. > > c) The controller method is named somemethod(), not __somemethod(). > > When Configure Debug > 0, the redirect works fine. > > When Configure Debug = 0, the output of default.ctp is built and sent > to the browser up to the very first line that calls a helper, and > there everything terminates. The user sees an empty page or partial > build of default.ctp, and the header redirect never happens. > > The work-around is to create an empty somemethod.ctp with just <?php ? > > > in it. Then the redirect works fine. > > Dewald --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---