I have had this exact same problem it can hold you up for days..
Make sure you are using UTF-8 "BOMS".
Make sure tags in Model, Controller, and Views "<?
php"............................ "?>"
Have no spaces after or before them NONE. I found one in the cake
folder in the app model. You have six spaces this is literally the
cause of your frustrations. You should check every model, view, and
controller.. It does suck but it is what is causing your problem.
On Nov 6, 1:54 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi AD7six,
>
> I tried putting header in default layout for RSS, but didn't work. I
> didn't recieve that output buffer already started at XYZ. The only
> error that I am getting is "Invalid XML Declaration - Line: 1
> Character: 6". I also tried putting header command in controller
> class, but that also didn't work. :-(
>
> //views/layouts/rss/default.ctp
> <?php echo header("Cache-Control: no-cache, must-revalidate"); ?>
> <?php
> echo $rss->header();
> echo '<channel>';
> echo '<link>', Router::url('/', true), '</link>';
> echo '<language>en-us</language>';
> echo '<pubDate>', date("D, j M Y H:i:s", gmmktime()) . ' GMT', '</
> pubDate>';
> echo '<generator>Memento</generator>';
> echo '<managingEditor>[EMAIL PROTECTED]</managingEditor>';
> echo '<webMaster>[EMAIL PROTECTED]</webMaster>';
> echo '<docs>http://blogs.law.harvard.edu/tech/rss</docs>';
> echo $content_for_layout;
> echo '</channel>';
> ?>
>
> This is frustrating :-(
> isn't there any magic command that will automatically remove all the
> trailing and leading spaces ?
>
> Regards,
> Ritesh
>
> On Nov 6, 10:07 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Nov 6, 2:01 pm, bingo <[EMAIL PROTECTED]> wrote:
>
> > > hi all,
>
> > > I tried what Jon suggested. But still getting space before my xml
> > > declaration :-( ...this is killing me...isn't there a good way to
> > > debug this problem. Searching on the forum, I have realized that many
> > > people struggle with this.
>
> > "you could try issuing a header as the first line of your layout and
> > see where it complains output already
> > started. "
>
> > there are many threads because it's a common problem (or a common
> > mistake).
>
> > You'll find it in the end ;).
>
> > AD
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---