Title: XMLRPC &#8211; Garbage Characters before &lt;XML&gt; node??
Last modified: August 19, 2016

---

# XMLRPC – Garbage Characters before <XML> node??

 *  [CE](https://wordpress.org/support/users/chrisemersonnc/)
 * (@chrisemersonnc)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/)
 * I know there are a bunch of XMLRPC threads. I’ve searched through 8 (pages) or
   so and haven’t seen anyone reporting this particular issue so here I am starting
   a new post.
 * I like many folks want to use Live Writer to make posts to my local wordpress
   server. But like many others my xmlrpc.php isn’t working correctly.
 * Here’s my problem simplified into a screenshot:
    [http://img232.imageshack.us/img232/2109/xmlrpcgarbage20090720m.png](http://img232.imageshack.us/img232/2109/xmlrpcgarbage20090720m.png)(
   Generated using [http://gggeek.raprap.it/debugger/](http://gggeek.raprap.it/debugger/))
 * **For whatever reason, my xmlrpc.php file is including a few garbage characters
   before the <XML> node in xmlrpc’s response** (see screenshot). As you can see,
   the xmlrpc is reporting the right info – but the garbage characters are causing
   Live Writer to assume an invalid server response.
 * I have scoured the net for days for solutions and have tried many things including:
   –
   remove newlines from your .php files – disable all plugins – change your theme–
   include code in the xmlphp.php itself, etc
 * …But NONE of these things fixes my problem – the garbage characters won’t go 
   away!
 * My system specs are in the screenshot but here they are in text format:
 * – IIS6/Win2k3
    – FastCGI for IIS6 1.5 RC – PHP 5.3.0 – WordPress 2.8.2
 * HUGE thanks in advance to anyone who can help at all!
 * – Chris
 * _PS: If there is already a thread about this feel free to move this post there
   for me.._

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * (@josephscott)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149137)
 * These are probably a Byte Order Mark (BOM). Here’s a post that I found that describes
   this:
 * [http://www.jasonwoodcock.biz/2008/10/08/wordpress-a-byte-order-mark-found-in-utf-8-file-warning/](http://www.jasonwoodcock.biz/2008/10/08/wordpress-a-byte-order-mark-found-in-utf-8-file-warning/)
 * So either edit them out (very carefully) or you could try downloading a fresh
   copy of the xmlrpc.php file for 2.8.2 from Trac – [http://core.trac.wordpress.org/browser/tags/2.8.2/xmlrpc.php?format=txt](http://core.trac.wordpress.org/browser/tags/2.8.2/xmlrpc.php?format=txt)
 *  Thread Starter [CE](https://wordpress.org/support/users/chrisemersonnc/)
 * (@chrisemersonnc)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149255)
 * Thank you for your suggesting Joseph.
 * I followed the instructions of the 1st link you posted and using the same Hex
   editor as in the link I removed the leading garbage (BOM) characters from *every*
   php/css file in the following locations:
    – WordPress root folder – wp-includes
   folder – my selected theme folder
 * At this point I re-tested with the XMLRPC debugger and noted that my garbage (
   BOM) character count had gone from 9 to 3 – but not gone completely.
    [http://img517.imageshack.us/img517/7969/xmlrpcgarbage20090721.png](http://img517.imageshack.us/img517/7969/xmlrpcgarbage20090721.png)
 * Then I tried disabling all my plugins (rather than open all plugin php files 
   in hex editor). I retested with the debugger and saw the following:
    [http://img132.imageshack.us/img132/8953/xmlrpcgarbage20090721b.png](http://img132.imageshack.us/img132/8953/xmlrpcgarbage20090721b.png)
 * Holy cow all the garbage (BOM) characters were gone!
 * At this point it was just a process of elimination to find which plugin was causing
   those 3 garbage (BOM) characters. It ended up being [AJAXed WordPress 1.28]. 
   So I kept that plugin disabled and now my XMLRPC works perfect!
 * I have to say this was quite a tedious process and I sure hope something can 
   be done in future to make it not so painful for people like me (Windows/IIS users?)
   to deal with. But in any case – a HUGE thank you to you Joseph! I love you man!!
 * – Chris
 *  [emmadw](https://wordpress.org/support/users/emmadw/)
 * (@emmadw)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149256)
 * I’ve just found this thread & am trying to decide if I have the same problem,
   or another one.
    From what I can tell, most folks have the problem that Live 
   Writer won’t even connect to the blog. Is that right? I’ve had no difficulties
   getting to the blog ( [http://wordpress.org/support/topic/291727?replies=3](http://wordpress.org/support/topic/291727?replies=3))–
   but I have had extraneous characters from the formatting (e.g. /p) creeping in.
 * I’ve tried disabling the plugins, but that didn’t work.
 *  [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * (@josephscott)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149292)
 * [@chrisemersonnc](https://wordpress.org/support/users/chrisemersonnc/) –
    Good
   to hear you were able to pin it down to a plugin. What I suspect is that the 
   plugin has one or more files with a BOM. That gets added to the every XML-RPC
   response and causes the breakage. Have you contacted the plugin author to let
   him know about what you found?
 * [@emmadw](https://wordpress.org/support/users/emmadw/) –
    If you are seeing stripped
   brackets from HTML then you probably have this- [http://josephscott.org/archives/2009/03/conclusion-of-libxml2-issues-use-php-529-libxml2-273/](http://josephscott.org/archives/2009/03/conclusion-of-libxml2-issues-use-php-529-libxml2-273/)
   There is a plugin to help work around this – [http://josephscott.org/code/wordpress/plugin-libxml2-fix/](http://josephscott.org/code/wordpress/plugin-libxml2-fix/)
 * The bottom line though is that your server is using a combination of PHP & libxml
   that is known to be broken.
 *  Thread Starter [CE](https://wordpress.org/support/users/chrisemersonnc/)
 * (@chrisemersonnc)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149315)
 * Hrmm – I thought if I was using anything above php 5.2 I’d be safe from the “
   bad combination” dilemma – guess I should go back and read those threads to confirm
   what versions I”m using.
 * Still can’t thank you enough Joseph – such a world of difference now being able
   to use Live Writer to post to the blog.
 *  [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * (@josephscott)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149335)
 * All of the reports I’ve seen of BOM problems have been on Windows servers. Seems
   like a text editor on Windows will inject a BOM when editing files. I’m not yet
   sure what conditions trigger this.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘XMLRPC – Garbage Characters before <XML> node??’ is closed to new replies.

## Tags

 * [garbage characters](https://wordpress.org/support/topic-tag/garbage-characters/)
 * [xmlrpc](https://wordpress.org/support/topic-tag/xmlrpc/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 3 participants
 * Last reply from: [Joseph Scott](https://wordpress.org/support/users/josephscott/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/xmlrpc-garbage-characters-before-ltxmlgt-node/#post-1149335)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
