Using Windows Live Writer for Blogging(Updated)

by Abdurahman Mashur on November 3, 2008

div style=”padding-right: 0px; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px; display: inline” id=”scid:0767317B-992E-4b12-91E0-4F059A8CECA8:ccaa7572-7638-4ece-a204-a8f86d61671c” class=”wlWriterSmartContent”Technorati Tags: a href=”http://technorati.com/tags/Windows+Live+Writer” rel=”tag”Windows Live Writer/a,a href=”http://technorati.com/tags/WLW” rel=”tag”WLW/a,a href=”http://technorati.com/tags/software+review” rel=”tag”software review/a/div p#160;a href=”http://www.irethinks.com/wp-content/uploads/wlw-banneridea-with-white-b.jpg”img style=”border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px” border=”0″ alt=”WLW_banneridea_with_white_b” src=”http://www.irethinks.com/wp-content/uploads/wlw-banneridea-with-white-b-thumb.jpg” width=”471″ height=”229″ //a /p pI’m writing this post using Windows Live Writer. Actually, I used Live writer on my previous blog in WordPress.com and it has no problem./p pLast night I configured my Live Writer to start posting on this blog. But it has problems with it HTML parsing..Currently, Im using WLW version 12.xxxx/p

Weird Things Huh??

Actually, that weird code should be like this :

I’m writing this post using Windows Live Writer WordPress online editor. Actually, I used Live writer on my previous blog in WordPress.com and it has no problem.

Last night I configured my Live Writer to start posting on this blog. But it has problems with its HTML parsing. Currently, Im using WLW version 12.xxxx

Now, I already downloaded the newest version 14.xxxx(Technical Preview Beta). And it still has the same problems.

Okey, I’m fed up with WLW now, Anybody knows how’s to fix that? In some forum(Yeah I googled it and don’t want to paste the link here, anyway, it doesn’t fix the problem) there are some possibilities that cause this problems :

  • Something called mod_security in your web hosting.
  • XML-RPC has some problems, I tried to analyze the code but I still cant find the error.
  • There is some bug with libxml2.
  • There are multiple bugs on PHP ( Thanks to JOE CHENG from Microsoft)
Anyone has same problems with me?
UPDATE:
I still curious about this problem, and find the solution. Unfortunately, because I’m hosting this blog on a free server I can’t do this on my own hosting(Yeah, It’s free with basic support). It’s confirmed that libxml module on your PHP Server is the problem.
Here are the solution:
When you parse XML with PHP and libxml 2.7.0, all HTML entities were stripped out and this annoying bug messed up a lot of things and no one seems to care enough to fix this.

This bug is also reported here:
http://bugs.php.net/bug.php?id=45996
http://bugs.typo3.org/view.php?id=9359&nbn=2

From reading these few resources, I knew I had to downgrade to an older version of libxml but since I’m not very good at Linux I had no idea how to.

But I finally figured this out and here is how to do it with WHM/cPanel:

First you will have to install an older version of libxml, I installed libxml 2.6.30.
You will need an SSH client and you will have to login to your server with root, I use Putty:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
Download it, run it, enter the IP address of your server, enter root and enter your password.
Then do:

cd /opt

mkdir libxml

cd libxml

wget http://xmlsoft.org/sources/libxml2-2.6.30.tar.gz

tar xvzf libxml2-2.6.30.tar.gz

cd libxml2-2.6.30

./configure –bindir=/opt/libxml/ –sbindir=/opt/libxml/ –libexecdir=/opt/libxml/ –datadir=/opt/libxml/ –sysconfdir=/opt/libxml/ –sharedstatedir=/opt/libxml/ –libdir=/opt/libxml/ –includedir=/opt/libxml/ –oldincludedir=/opt/libxml/

make && make install

Now you will need to update yum.conf to prevent it from updating libxml back, so edit:
/etc/yum.conf

And find the line that starts with:
exclude=

And add libxml* to the end of it so this line should look something like this:
exclude=apache* bind-chroot courier* dovecot* exim* httpd* mod_ssl* mysql* nsd* php* proftpd* pure-ftpd* spamassassin* squirrelmail* libxml*

Now we will have to let WHM know that we want to compile PHP with this new libxml path so go to:
/var/cpanel/easy/apache/rawopts/

There might be a file there named: “all_php5″ (no quotes) if there is edit it if there is not create it and add these lines to the end of it:
–with-libxml-dir=/opt/libxml
–with-libxml-dir=/opt/libxml/

Now go ahead and build Apache and PHP using:
Main >> Software >> Apache Update

You should be all set.

Please note:
1 – Do this on your own risk.
2 – I’m not very good at Linux so please let me know if there is an easier method.
3 – This worked great on my CentOS.
4 – If you have never used WHM’s Apache Update, go ahead and read about it first.

Thanks to some good guy from blog.code-head.com. Please click the link for complete article :) .

Technorati Tags: ,,

{ 1 trackback }

段海新的博客 » libxml的Bug导致WLW发布上来HTML标签被删掉了
January 8, 2009 at 11:10 am

{ 2 comments… read them below or add one }

pakesepas January 8, 2009 at 12:35 am

hi, very good article. I am usin 00webhost and i am having the same problem with html parsin.

With This trick you arranged the problem in your free hosting?

Reply

Abdurahman January 13, 2009 at 7:27 pm

Yeah, i already submit this problem to the admin. But like usual, they afraid to make some modifications to their system and think that this is not a big problem.

Reply

Leave a Comment

Previous post:

Next post: