£50 says you have short_open_tags enabled in your php.ini

php thinks
<?xml version="

is actually

<?php xml version="....


Mike

On Nov 6, 11:56 am, bingo <[EMAIL PROTECTED]> wrote:
> hi AD7six,
>
> I used Chris Lamp's magic command (see below) to get rid of all new
> trailing blank lines
>
> $ find -name "*.php" | xargs sed -i -e :a -e '/^\n*$/{$d;N;ba' -e '}'
>
> The above command did help as now I am not getting any blank line
> before my xml declaration. But I am still getting some blank spaces
> before my xml declaration. I tried what you suggested but still not
> able to find any specific problem. Based on your suggestion, I changed
> my layout to look like this
>
> //File: views/layouts/rss/default.ctp
> <?xml version="1.0" encoding="UTF-8" ?>
> <?php
> 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>';
> ?>
>
> However if I set debug to 2, I am getting this error message
>
> Parse error: parse error, unexpected T_STRING in D:\xampp\xampp\htdocs
> \memento\app\views\layouts\rss\default.ctp on line 1
>
> I am still clueless. :-(
>
> Regards,
> Ritesh
>
> On Nov 6, 5:49 am, AD7six <[EMAIL PROTECTED]> wrote:
>
> > On Nov 6, 10:15 am, bingo <[EMAIL PROTECTED]> wrote:
>
> > > hi,
>
> > >  I am using cakePHP 1.2 and having trouble getting RSS working. My RSS
> > > output contains one blank line before the start of the first tag,
> > > breaking my RSS. I have checked all my modules, controllers, views,
> > > components, and helpers for blank space but didn't find anywhere. Did
> > > anyone experienced similar problem before and would be kind enough to
> > > tell me where possibly I am making a mistake or how to find where I
> > > might be inserting a blank line
>
> > > Regards,
> > > Ritesh
>
> > Have you got any code which contains ... ?> <?php ..
>
> > There really is only one cause. you could try issuing a header as the
> > first line of your layout and see where it complains output already
> > started.
>
> > hth,
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to