Wednesday, November 1, 2006
This was really irritating me today. I set up a new WordPress installation (more on that another day), tweaked it up a little bit, and then couldn’t get it working with Windows Live Writer, which is my blogging tool at the moment. (It really is one of the better Microsoft products).
So I go through the add new blog wizard, and then I get this obnoxious error:
So irritating! Naturally I googled, and came across a solution. All I had to do was add these lines to my .htaccess file:
But that didn’t solve the problem. It actually made it worse…. now I was getting an apache error even getting to the blog page through a browser.
After doing some Http proxy snooping using Fiddler, I figured out that the error was this:
Warning: Cannot modify header information – headers already sent by (output started at /home/testdomain.com/html/wp-content/plugins/recent-posts.php:2)
Ah! Now we are getting somewhere. When I opened up the offending plugin file, I found blank lines at the top and bottom before the <? , which is what caused the whole problem… the xmlrpc.php in WordPress couldn’t change the headers because the blank lines had already been sent down to the client. This then caused the XML to be invalid, which gave me that error.