<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blaszta! &#187; windows live writer</title>
	<atom:link href="http://www.blaszta.com/blog/tag/windows-live-writer/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blaszta.com/blog</link>
	<description>“Kalau Ada yang Gratis, Kenapa Pakai Bajakan?”</description>
	<lastBuildDate>Mon, 01 Feb 2010 08:49:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Bug Ketika Menggunakan WP 2.7.1 dan Windows Live Writer</title>
		<link>http://www.blaszta.com/blog/2009/02/bug-ketika-menggunakan-wp-271-dan-windows-live-writer/</link>
		<comments>http://www.blaszta.com/blog/2009/02/bug-ketika-menggunakan-wp-271-dan-windows-live-writer/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 23:39:54 +0000</pubDate>
		<dc:creator>blaszta</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[Freeware]]></category>
		<category><![CDATA[windows live writer]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.blaszta.com/blog/2009/02/27/bug-ketika-menggunakan-wp-271-dan-windows-live-writer/</guid>
		<description><![CDATA[Image via Wikipedia Setiap posting artikel akhir-akhir ini saya selalu kebingungan.. Tampilan artikel di blog kacau balau! Tapi setelah saya perhatikan, semua tanda “&#60;” &#38; “&#62;” yang notabene sering sekali digunakan di HTML hilang semua! Wah pantas aja tampilannya jadi ajaib begini. Usut punya usut dan browsing + googling, akhirnya ketemu masalahnya. Ada 3 hal [...]]]></description>
			<content:encoded><![CDATA[<div class="zemanta-img" style="display: block; float: right; margin: 1em; width: 160px" jquery1235706705346="199"><a href="http://en.wikipedia.org/wiki/Image:Windows_Live_Writer_logo.png"><img style="border-right: medium none; border-top: medium none; display: block; border-left: medium none; border-bottom: medium none" height="150" alt="20px|Windows Live Logo Windows Live Writer" src="http://upload.wikimedia.org/wikipedia/en/d/d1/Windows_Live_Writer_logo.png" width="150" /></a>
<p class="zemanta-img-attribution" style="font-size: 0.8em">Image via <a href="http://en.wikipedia.org/wiki/Image:Windows_Live_Writer_logo.png">Wikipedia</a></p>
</p></div>
<p>Setiap posting artikel akhir-akhir ini saya selalu kebingungan.. Tampilan artikel di blog kacau balau! Tapi setelah saya perhatikan, semua tanda “&lt;” &amp; “&gt;” yang notabene sering sekali digunakan di HTML hilang semua! Wah pantas aja tampilannya jadi ajaib begini.</p>
<p>Usut punya usut dan browsing + googling, akhirnya ketemu masalahnya. Ada 3 hal yang jadi penyebabya:</p>
<ol>
<li>Anda menggunakan WordPress 2.7.1 (seingat saya ketika masih versi 2.7 tidak ada masalah). </li>
<li>Anda menulis dengan Windows Live Writer (WLW) yang ketika publish article memanfaatkan XML-RPC. </li>
<li>Libxml yang digunakan PHP pada sever anda adalah versi 2.7.x </li>
</ol>
<p> <span id="more-333"></span>
<p>Secara sederhana, permasalahan utama terletak pada bug di libxml yang digunakan oleh PHP (bahasa pemrograman yang digunakan WordPress). WLW memanfaatkan <em>library </em>libxml ketika mengupload artikel. Jika ada bug pada libxml, maka secara otomatis artikel yang di upload pasti jadinya salah. Saat ini diketahui bahwa libxml versi 2.7.0 hingga 2.7.3 bermasalah.</p>
<p>Bagaimana untuk tahu versi libxml pada server? Buat sebuah file dan berinama info.php dan isikan kode berikut:</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"><span style="color: #0000ff">&lt;?</span>php <a style="color: #ffa500" href="http://www.php.net/phpinfo">phpinfo</a>(); <span style="color: #0000ff">?&gt;</span></pre>
</pre>
<p>Simpan file, &amp; upload ke root directory lalu jalankan file tersebut di browser. Misalkan: <a href="http://www.namadomain.com/info.php">www.namadomain.com/info.php</a></p>
<p>Seluruh tampilan konfigurasi PHP akan muncul pada layar. Pencet Ctrl + F untuk melakukan pencarian dan ketik “libxml” &amp; pencet next beberapa kali jika terdapat beberapa kata libxml. Yang anda cari tampilannya akan seperti ini: </p>
<p><img title="tmp74A9" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="96" alt="tmp74A9" src="http://www.blaszta.com/blog/wp-content/uploads/2009/02/tmp74a9.png" width="504" border="0" /></p>
<p>Dari tampilan di atas terlihat bahwa PHP di server saya menggunakan versi 2.7.3.</p>
<p>Point no. 3 ini sedikit merepotkan, apalagi jika anda menggunakan <em>shared hosting </em>dimana anda tidak mungkin mengubah-ubah konfigurasi server. Lalu bagaimana solusinya?</p>
<p>Solusi pertama: upgrade versi libxml di server ke versi yang lebih baru (namun tidak ada kepastian bahwa bug ini sudah diperbaikin) atau downgrade ke versi 2.6.32. Opsi ini tentu tidak dapat dilakukan jika anda tidak memiliki server blog anda sendiri.</p>
<p>Solusi kedua: jangan gunakan WLW, atau program blogging lain yang memanfaatkan libxml. Hmm.. ini sedikit repot buat saya, karena saya kadung jatuh cinta sama WLW <img src='http://www.blaszta.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /> </p>
<p>Solusi ketiga: patch WordPress anda! Perlu diingat bahwa ini bukan patch resmi dari WP. Ada 3 file yang perlu di patch:</p>
<ol>
<li>blogger.php (direktori wpadmin/import) </li>
<li>class-IXR.php, dan </li>
<li>rss.php (keduanya di direktori wp-includes) </li>
</ol>
<p>Pada dasarnya patch ini adalah untuk memanipulasi string “&lt;&gt;&amp;” sebelum fungsi xml_parse dipanggil:</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  1: //xmllib 2.7.0 -2.7.2 stripping leading angle brackets bug patch
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  2: if(LIBXML_DOTTED_VERSION == '2.7.0' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  3: LIBXML_DOTTED_VERSION == '2.7.1' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  4: LIBXML_DOTTED_VERSION == '2.7.2' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  5: LIBXML_DOTTED_VERSION == '2.7.3'
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  6: ){
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  7: $xml =str_replace(&quot;&amp;lt;&quot;,&quot;&amp;#60;&quot;,$xml );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  8: $xml =str_replace(&quot;&amp;gt;&quot;,&quot;&amp;#62;&quot;,$xml );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  9: $xml =str_replace(&quot;&amp;amp;&quot;,&quot;&amp;#38;&quot;,$xml );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 10: }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 11: //end Fix
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 12: xml_parse($parser, $xml);</pre>
</pre>
<p><strong>Patch untuk blogger.php</strong></p>
<p>Update fungsi parse menjadi:</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  1: function parse($xml) {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  2:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  3: 	global $app_logging;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  4: 	array_unshift($this-&gt;ns_contexts, array());
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  5:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  6: 	$parser = xml_parser_create_ns();
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  7: 	xml_set_object($parser, $this);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  8: 	xml_set_element_handler($parser, &quot;start_element&quot;, &quot;end_element&quot;);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  9: 	xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 10: 	xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 11: 	xml_set_character_data_handler($parser, &quot;cdata&quot;);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 12: 	xml_set_default_handler($parser, &quot;_default&quot;);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 13: 	xml_set_start_namespace_decl_handler($parser, &quot;start_ns&quot;);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 14: 	xml_set_end_namespace_decl_handler($parser, &quot;end_ns&quot;);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 15:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 16: 	$contents = &quot;&quot;;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 17:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 18: 	//xmllib 2.7.0 -2.7.2 stripping leading angle brackets bug patch
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 19:   if(LIBXML_DOTTED_VERSION == '2.7.0' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 20:   LIBXML_DOTTED_VERSION == '2.7.1' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 21:   LIBXML_DOTTED_VERSION == '2.7.2' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 22:   LIBXML_DOTTED_VERSION == '2.7.3'
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 23:   ){
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 24:   $xml =str_replace(&quot;&amp;lt;&quot;,&quot;&amp;#60;&quot;,$xml );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 25:   $xml =str_replace(&quot;&amp;gt;&quot;,&quot;&amp;#62;&quot;,$xml );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 26:   $xml =str_replace(&quot;&amp;amp;&quot;,&quot;&amp;#38;&quot;,$xml );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 27:   }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 28:   //end Fix
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 29:   xml_parse($parser, $xml);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 30:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 31: 	xml_parser_free($parser);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 32:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 33: 	return true;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 34: }</pre>
</pre>
<p><strong>Patch untuk class-IXR.php</strong></p>
<p>Update fungsi yang sama, namun kodenya sedikit berbeda:</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  1: function parse() {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  2:     // first remove the XML declaration
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  3:     $this-&gt;message = preg_replace('/<span style="color: #0000ff">&lt;</span>\?xml(.*)?\?'.'<span style="color: #0000ff">&gt;</span>/', '', $this-&gt;message);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  4:     if (trim($this-&gt;message) == '') {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  5:         return false;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  6:     }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  7:     $this-&gt;_parser = xml_parser_create();
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  8:     // Set XML parser to take the case of tags in to account
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  9:     xml_parser_set_option($this-&gt;_parser, XML_OPTION_CASE_FOLDING, false);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 10:     // Set XML parser callback functions
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 11:     xml_set_object($this-&gt;_parser, $this);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 12:     xml_set_element_handler($this-&gt;_parser, 'tag_open', 'tag_close');
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 13:     xml_set_character_data_handler($this-&gt;_parser, 'cdata');
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 14:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 15:     //xmllib 2.7.0 -2.7.2 stripping leading angle brackets bug patch
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 16:     if(LIBXML_DOTTED_VERSION == '2.7.0' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 17:     LIBXML_DOTTED_VERSION == '2.7.1' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 18:     LIBXML_DOTTED_VERSION == '2.7.2' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 19:     LIBXML_DOTTED_VERSION == '2.7.3'
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 20:     ){
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 21:     $this-&gt;message =str_replace(&quot;&amp;lt;&quot;,&quot;&amp;#60;&quot;,$this-&gt;message );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 22:     $this-&gt;message =str_replace(&quot;&amp;gt;&quot;,&quot;&amp;#62;&quot;,$this-&gt;message );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 23:     $this-&gt;message =str_replace(&quot;&amp;amp;&quot;,&quot;&amp;#38;&quot;,$this-&gt;message );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 24:     }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 25:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 26:     if (!xml_parse($this-&gt;_parser, $this-&gt;message)) {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 27:         /* die(sprintf('XML error: %s at line %d',
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 28:             xml_error_string(xml_get_error_code($this-&gt;_parser)),
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 29:             xml_get_current_line_number($this-&gt;_parser))); */
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 30:         return false;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 31:     }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 32:     xml_parser_free($this-&gt;_parser);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 33:     // Grab the error messages, if any
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 34:     if ($this-&gt;messageType == 'fault') {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 35:         $this-&gt;faultCode = $this-&gt;params[0]['faultCode'];
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 36:         $this-&gt;faultString = $this-&gt;params[0]['faultString'];
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 37:     }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 38:     return true;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 39: }</pre>
</pre>
<p><strong>Patch untuk rss.php</strong></p>
<p>Update fungsi MagpieRSS:</p>
<pre style="border-right: #cecece 1px solid; padding-right: 5px; border-top: #cecece 1px solid; padding-left: 5px; min-height: 40px; padding-bottom: 5px; overflow: auto; border-left: #cecece 1px solid; width: 650px; padding-top: 5px; border-bottom: #cecece 1px solid; background-color: #fbfbfb">
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  1: function MagpieRSS ($source) {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  2:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  3: 	# if PHP xml isn't compiled in, die
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  4: 	#
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  5: 	if ( !function_exists('xml_parser_create') )
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  6: 		trigger_error( &quot;Failed to load PHP's XML Extension. http://www.php.net/manual/en/ref.xml.php&quot; );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  7:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff">  8: 	$parser = @xml_parser_create();
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb">  9:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 10: 	if ( !is_resource($parser) )
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 11: 		trigger_error( &quot;Failed to create an instance of PHP's XML parser. http://www.php.net/manual/en/ref.xml.php&quot;);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 12:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 13:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 14: 	$this-&gt;parser = $parser;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 15:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 16: 	# pass in parser, and a reference to this object
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 17: 	# setup handlers
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 18: 	#
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 19: 	xml_set_object( $this-&gt;parser, $this );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 20: 	xml_set_element_handler($this-&gt;parser,
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 21: 			'feed_start_element', 'feed_end_element' );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 22:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 23: 	xml_set_character_data_handler( $this-&gt;parser, 'feed_cdata' );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 24:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 25: 	//xmllib 2.7.0 -2.7.2 stripping leading angle brackets bug patch
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 26:   if(LIBXML_DOTTED_VERSION == '2.7.0' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 27:   LIBXML_DOTTED_VERSION == '2.7.1' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 28:   LIBXML_DOTTED_VERSION == '2.7.2' ||
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 29:   LIBXML_DOTTED_VERSION == '2.7.3'
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 30:   ){
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 31:   $source =str_replace(&quot;&amp;lt;&quot;,&quot;&amp;#60;&quot;,$source );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 32:   $source =str_replace(&quot;&amp;gt;&quot;,&quot;&amp;#62;&quot;,$source );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 33:   $source =str_replace(&quot;&amp;amp;&quot;,&quot;&amp;#38;&quot;,$source );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 34:   }
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 35:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 36:   $status = xml_parse( $this-&gt;parser, $source );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 37:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 38: 	if (! $status ) {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 39: 		$errorcode = xml_get_error_code( $this-&gt;parser );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 40: 		if ( $errorcode != XML_ERROR_NONE ) {
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 41: 			$xml_error = xml_error_string( $errorcode );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 42: 			$error_line = xml_get_current_line_number($this-&gt;parser);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 43: 			$error_col = xml_get_current_column_number($this-&gt;parser);
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 44: 			$errormsg = &quot;$xml_error at line $error_line, column $error_col&quot;;
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 45:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 46: 			$this-&gt;error( $errormsg );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 47: 		}
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 48: 	}
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 49:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 50: 	xml_parser_free( $this-&gt;parser );
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 51:
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #ffffff"> 52: 	$this-&gt;normalize();
</pre>
<pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,&#39;Courier New&#39;,courier,monospace; background-color: #fbfbfb"> 53: }</pre>
</pre>
<p>Untuk memudahkan, saya memberikan ketiga file tersebut yang telah dimodifikasi dalam bentuk zip. Cukup diekstrak &amp; di upload dengan FTP ke root directory blog anda.</p>
<p><div class="note"><div class="notewarning">Patch yang saya berikan hanya untuk WordPress 2.7.1. Jika anda menggunakan WP versi lain, upgrade terlebih dahulu atau patch manual dengan cara di atas! </div></div></p>
<p><div class="note"><div class="notetip">Backup ketiga file tersebut sebelum di patch. Jika ternyata bermasalah, cukup upload kembali file backup tersebut. </div></div></p>
<p>Download WordPress libxml patch: <a href="http://www.blaszta.com/upload/wp_libxml_patch.zip" target="_blank">wp_libxml_pacth.zip</a> (23.45 KB).</p>
<p>Referensi:</p>
<ul>
<li><a title="http://josephscott.org/archives/2008/12/problems-with-libxml2-for-wordpress-xml-rpc-users/" href="http://josephscott.org/archives/2008/12/problems-with-libxml2-for-wordpress-xml-rpc-users/">http://josephscott.org/archives/2008/12/problems-with-libxml2-for-wordpress-xml-rpc-users/</a></li>
<li><a title="http://josephscott.org/archives/2009/02/update-on-libxml2-issues/" href="http://josephscott.org/archives/2009/02/update-on-libxml2-issues/">http://josephscott.org/archives/2009/02/update-on-libxml2-issues/</a></li>
<li><a title="http://blog.hoofoo.net/2009/01/14/wordpress-patch-for-problamatic-libxml2-version/" href="http://blog.hoofoo.net/2009/01/14/wordpress-patch-for-problamatic-libxml2-version/">http://blog.hoofoo.net/2009/01/14/wordpress-patch-for-problamatic-libxml2-version/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.blaszta.com/blog/2009/02/bug-ketika-menggunakan-wp-271-dan-windows-live-writer/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
