You might want to remove your closing ?> tag in the imported file(s).
It is not needed in a pure php file (those that DON't mix php and
html) which does not have any raw/html text to be displayed. And it
will ensure you have no problem with a trailing whitespace. Which I
think is probably the #1 problem for the error headers already sent.

Aslo run the whitespace task in the shell from DebugKit. I used to
always be surprised by what it found. And finally realized various
editors diffs, merge tools etc were the cause. Cant live without some
of those tools and I can't control the other developers working on the
project, so just remove the closing ?> in the files. PHP has never
required it. And it is a best practice on many php based app sites to
leave the closing ?> off.

You'll notice most(probably all) of the cakephp core for 1.3 like
core.php, bootstrap.php etc. has taken on this form or best practice
as well.

On Feb 10, 1:29 pm, Ryan Schmidt <[email protected]> wrote:
> On Feb 10, 2011, at 12:04, RLR wrote:
>
> > On Feb 10, 2011, at 11:48, RLR wrote:
>
> >> As soon as I put the following line in app_controller the Auth
> >> component and redirecting breaks with the following errors:
>
> >> App::import('Vendor', 'DateCalc', array('file' => 'date_calc.php'));
>
> >> Error in browser:
> >> Cannot modify header information - headers already sent by (output
> >> started at path-to-my-app/app/vendors/date_calc.php:1
>
> > As soon as I take the App:Import statement out everything works
>
> Then there is something about the file you're importing -- or one of the 
> files that file is importing -- that's causing this. If it's not something 
> deliberately being echo'd out, then perhaps whitespace before opening <?php 
> tag or after closing ?> tag?

-- 
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