The controller which is used for that page is usually the best place to start. This sounds like the sort of problem which occurs if you start output early, usually by calling echo from the controller (or calling a function which calls echo or otherwise starts output).