![]() |
rss feed error "XML or text declaration not at start of entity Location" - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: rss feed error "XML or text declaration not at start of entity Location" (/showthread.php?tid=10309) |
rss feed error "XML or text declaration not at start of entity Location" - El Forum - 07-26-2008 [eluser]jonnyjon[/eluser] I am echoing rss as output from .php code with the header: header('Content-Type: text/xml; charset=utf-8'); However, I'm getting this error: XML Parsing Error: XML or text declaration not at start of entity Location: http://cliixx.com/jon/popular/images/?format=rss Line Number 1, Column 2: <?xml version="1.0" encoding="utf-8" ?> I think it means there is an extra whitepsace in some file along the chain. Anyone know where to look? rss feed error "XML or text declaration not at start of entity Location" - El Forum - 07-26-2008 [eluser]Philip Ramirez[/eluser] You have a space before "<?xml version="1.0" encoding="utf-8" ?>". Getting rid of it should do the trick. rss feed error "XML or text declaration not at start of entity Location" - El Forum - 07-26-2008 [eluser]jonnyjon[/eluser] Yes, I think that's the problem too. But I've checked all my files and there are no spaces. I think its a space somewhere in one of the CI core files. But there are so many. rss feed error "XML or text declaration not at start of entity Location" - El Forum - 07-26-2008 [eluser]Philip Ramirez[/eluser] Can you post the code for this file? rss feed error "XML or text declaration not at start of entity Location" - El Forum - 09-30-2008 [eluser]SitesByJoe[/eluser] I'm running into the same error. Here's my controller for testing: Code: <?php With no other spaces being added, its certainly a mystery where its coming from... Anyone figure this out? rss feed error "XML or text declaration not at start of entity Location" - El Forum - 09-05-2009 [eluser]SitesByJoe[/eluser] I just received a private email asking if I've figured this mystery white space issue out. Sadly, the answer is "No". I ran some tests (using the same thing as the test Sitemap Controller above (and using both the PHP4 and PHP5 constructs) However, I'm not experiencing the issues using CI 1.7.1 (official release). I've been using this release since it was issued without trouble. I also have my own SVN repository with my own "tweeked" version of CI that I start with at this point. I haven't downloaded any of Ellis Labs latest builds. If the "out of the box" version is still doing it, PM me and I'll let you download my copy. My "tweeks" are just some extra application files (no core changes) and the pieces for a nice one-user CMS (like fckeditor and the filemanager etc). If anyone did figure this space issue out, let us know! I still have a bunch of sites running on the 1.6.* versions that still have errors on the google sitemaps due to the spaces. rss feed error "XML or text declaration not at start of entity Location" - El Forum - 09-15-2009 [eluser]mattpointblank[/eluser] Fixed it - Solution was here: http://ellislab.com/forums/viewthread/74499/#371704 rss feed error "XML or text declaration not at start of entity Location" - El Forum - 12-17-2009 [eluser]boltoncole[/eluser] Whoa mate! Really thanks for this great solution about rss feeds =) rss feed error "XML or text declaration not at start of entity Location" - El Forum - 04-23-2010 [eluser]Unknown[/eluser] I still don't get it sorry I am noob on PHP I just recently started a blog using self hosted Word Press and the feed works on IE but not on FireFox giving me the error: XML Parsing Error: XML or text declaration not at start of entity Location: http://www.farneville.com/feed/rss Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.9.2" --> Now given the solutions here I do not know where to find the php file that has white space. Lols while writing this I just found the solution it might be worth noting for other people looking for the same. Here it is http://validator.w3.org/feed/docs/error/WPBlankLine.html :lol: |