Fixed it. CakePHP users beware of leaving spaces in your model,
controller, view etc..  This error was a pain to track down.  All it
takes is one space and your fun bus is up on blocks for RSS...  Only
took a couple of days to track down...........

On Oct 31, 12:11 pm, seacloud9 <[EMAIL PROTECTED]> wrote:
> XML Parsing Error: xml declaration not at start of external entity
> Location:http://ihang10.com/rss/posts
> Line Number 1, Column 2: <?xml version="1.0" encoding="UTF-8"?>
> -^
>
> All pages in my cakePHP install add one space at the beginning of
> every document. It causes an overall foobar on my rss feed.  I have
> altered the layout default.thml page to be UTF-8 NO BOM's in
> dreamweaver.  I have also done the same in rss.thtml I still have one
> space this error is driving me crazy like an itch I can't scratch.
> Has anyone run into this my fun bus seems to be up on
> blocks...................
>
> I have also read this section of  
> http://logs.cakephp.nu/cakephp/chat.log.2007-05-27
>
> *       18:14   rnickel          <?xml version="1.0" encoding="UTF-8" ?>
> *       18:14   rnickel         ----^
> *       18:14   rnickel         that's what firefox tells me
> *       18:14   AD7six  rnickel that is not an error message.
> *       18:14   rnickel         I didn't code the opening xml code
> *       18:14   rnickel         parsing error - heh
> *       18:15   sgumby_         maybe you left spaces after the closing ?> of 
> your
> controller
>
> *       18:24   rnickel         Line Number 1, Column 5: <?xml version="1.0"
> encoding="UTF-8" ?>
> *       18:24   rnickel         ----^
> *       18:26   AD7six  rnickel you have 4 characters which are before the
> xml declaration that you need to find. do anything that will issue a
> header and you'll then get a php "cannot do xyz because output started
> in /offending/file/open/me/and/delete/the/space/on/line:1" error
> message.
> *       18:27   jerrylee        ([EMAIL PROTECTED]) left
> irc: "so late here, see you guys"
> *       18:27   Rik`_   ([EMAIL PROTECTED]) joined
> #cakephp.
> *       18:28   rnickel         AD7six I have found where the xml helper's 
> header()
> function, but what would call and output this header?
> *       18:28   rnickel         I'm not too sure how the inner workings of 
> cake-php
> works at the moment, just how to use it haha
> *       18:29   AD7six  rnickel this has nothing to do with cake.
> *       18:29   sgumby_         ([EMAIL PROTECTED])
> left irc: "This computer has gone to sleep"
> *       18:29   ivan_24_        somebody knows something about i18n feature in
> cakephp 1.2
> *       18:29   rnickel         AD7six: it doesn't? cake is generating all 
> this
> content...
> *       18:29   ivan_24_        i need to know what defaut.po catch cake when 
> the
> confing.language is not set or is set wrong.
> *       18:29   AD7six  rnickel really? I would say your code is.
> *       18:30   AD7six  rnickel put <?php header('Location: something' ); ?>
> as the first line of your layout. then read the error messages.
> *       18:30   Lucian  ivan_24: when no config.language is set, cake
> doesn't catch any default.mo file
> *       18:30   rnickel         All I did was add the following to the
> routes.php :Router::parseExtensions();, and in my services.ctp (within
> the xml directory of course) I have this: <foo>
> *       18:30   rnickel         <bar><?php print $message; ?></bar>
> *       18:30   rnickel         </foo>
> *       18:31   Rik`    ([EMAIL PROTECTED]) left irc:
> Read error: 110 (Connection timed out)
> *       18:31   ivan_24_        i wonder if the idea of cakephp is that you 
> have
> tu set your msgid'S in the .po (i.e app/locale/spa/LC_MESSAGEs/
> default.po) with your default language and when if the
> config.languaje="@#?~" for example the locale doesnt exist and dont
> found the locale, then the output of the function __("my sentence") is
> "my sentence"
> *       18:31   Nick    change: Rik`_ -> Rik`
> *       18:32   Lucian  ivan_24: true, when no local file is found, __("my
> sentence") returns "my sentence"
> *       18:32   rnickel         AD7six: I did the header thing, and my 
> browser was
> forwarded
> *       18:32   AD7six  rnickel so what does that tell you.
> *       18:33   sightPress      sorry, i /have/ to share 
> this.http://www.dagbladet.no/nyheter/2007/05/26/501766.html
> *       18:33   ivan_24_        then always you muts set yours msgids with 
> your
> default language
> *       18:33   rnickel         AD7six: it seems that any file that I request 
> has 4
> spaces infront of the first line
> *       18:34   rnickel         i.e. <!DOCTYPE html P ....
> *       18:34   ivan_24_        what happened if i want set my msg like
> "page1.prodtuc2"
> *       18:34   ivan_24_        happend
> *       18:34   Lucian  ivan_24: that, or you have to create a locale for
> your default language
> *       18:35   phpcurious      ([EMAIL PROTECTED]/phpcurious) joined
> #cakephp.
> *       18:38   ivan_24_        i wonder if cake aotomatically get the locale
> according with the browser and if this fault. what wo
> *       18:38   ivan_24_        uwould it do
> *       18:39   rnickel         AD7six: in my default.ctp in the xml directory
> there are no spaces before the opening xml tag...
> *       18:39   Lucian  ([EMAIL PROTECTED]) left irc:
> *       18:40   AD7six  rnickel where did you put that redirect statement.
> *       18:40   rnickel         in the default.ctp
> *       18:40   rnickel         AD7six: in the default.ctp
> *       18:41   AD7six  rnickel the first line of your xml default.ctp
> layout?
> *       18:41   rnickel         ya
> *       18:42   rnickel         AD7six: ya
> *       18:42   AD7six  what editor are you using
> *       18:42   rnickel         textmate
> *       18:42   AD7six  are you saving files as utf-8 and saving them with
> BOMs?
> *       18:42   rnickel         AD7six: I'm not too sure... how can I tell?
> *       18:43   AD7six  I don't use textmate - don't know. but the answer to
> your puzzle is going to be whitespace somewhere in your app folder, or
> BOMs I would suggest.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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