<?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"
	>

<channel>
	<title>Knut Kristian Johansen's blog</title>
	<atom:link href="http://www.kkj.no/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.kkj.no/blog</link>
	<description>Bits and pieces from my personal and professional life…</description>
	<pubDate>Sun, 19 Apr 2009 14:36:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
	<language>en</language>
			<item>
		<title>Matilde</title>
		<link>http://www.kkj.no/blog/?p=110</link>
		<comments>http://www.kkj.no/blog/?p=110#comments</comments>
		<pubDate>Sun, 19 Apr 2009 14:36:01 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog/?p=110</guid>
		<description><![CDATA[Jeg er så heldig å ha blitt pappa til ei lita jente med navn Matilde! Hun ble født på UNN tirsdag 14.04.2009 klokka 14:39 og var 3630 gram og 50 cm lang.
]]></description>
			<content:encoded><![CDATA[<p>Jeg er så heldig å ha blitt pappa til ei lita jente med navn Matilde! Hun ble født på UNN tirsdag 14.04.2009 klokka 14:39 og var 3630 gram og 50 cm lang.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=110</wfw:commentRss>
		</item>
		<item>
		<title>XPlanner installation</title>
		<link>http://www.kkj.no/blog/?p=84</link>
		<comments>http://www.kkj.no/blog/?p=84#comments</comments>
		<pubDate>Sun, 19 Apr 2009 13:58:32 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Methodology]]></category>

		<category><![CDATA[agile]]></category>

		<category><![CDATA[XPlanner]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog/?p=84</guid>
		<description><![CDATA[XPlanner is a project planning and tracking tool for eXtreme Programming (XP) teams. This guide describes how to install XPlanner on a Windows XP system.
Installation of required software

Download and install JDK 6 Update 13
Copy the file C:\Program Files\Java\jdk1.6.0_13\bin\msvcr71.dll into C:\WINDOWS\system\ (details)
Download and install Apache Tomcat 6.0.18
Download and unzip XPlanner Version 0.7b7
Copy the extracted folder xplanner-0.7b7-war\xplanner\ [...]]]></description>
			<content:encoded><![CDATA[<p>XPlanner is a project planning and tracking tool for eXtreme Programming (XP) teams. This guide describes how to install XPlanner on a Windows XP system.</p>
<h4>Installation of required software</h4>
<ol>
<li>Download and install <a href="http://developers.sun.com/downloads/">JDK 6 Update 13</a></li>
<li>Copy the file <code>C:\Program Files\Java\jdk1.6.0_13\bin\msvcr71.dll</code> into <code>C:\WINDOWS\system\</code> (<a href="http://www.duckware.com/tech/java6msvcr71.html">details</a>)</li>
<li>Download and install <a href="http://tomcat.apache.org/download-60.cgi">Apache Tomcat 6.0.18</a></li>
<li>Download and unzip <a href="http://heanet.dl.sourceforge.net/sourceforge/xplanner/xplanner-0.7b7b-war.zip">XPlanner Version 0.7b7</a></li>
<li>Copy the extracted folder <code>xplanner-0.7b7-war\xplanner\</code> into <code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\</code></li>
<li></li>
</ol>
<h4>Configuration of XPlanner</h4>
<p>Specify the database credentials in the XPlanner database configuration file <code>xplanner-custom.properties</code> which is located inside the <code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\xplanner\WEB-INF\classes\</code> folder.</p>
<h4>Adjustment of XPlanner source code</h4>
<p>XPlanner does not officially support the versions of Java and Tomcat that we have installed, but only minor adjustments needs to be taken to get up and running.</p>
<p><code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\xplanner\WEB-INF\classes\spring-beans.xml</code>. Replace (<a href="http://jira.codehaus.org/browse/XPR-391">details</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;repositories&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;map<span style="font-weight: bold; color: black;">&gt;</span></span></span>...<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/map<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span>
...</pre></div></div>

<p>with:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;property</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;repositories&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean</span> <span style="color: #000066;">class</span>=<span style="color: #ff0000;">&quot;java.util.HashMap&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;constructor-arg<span style="font-weight: bold; color: black;">&gt;</span></span></span>
            <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;map<span style="font-weight: bold; color: black;">&gt;</span></span></span>...<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/map<span style="font-weight: bold; color: black;">&gt;</span></span></span>
        <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/constructor-arg<span style="font-weight: bold; color: black;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/bean<span style="font-weight: bold; color: black;">&gt;</span></span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/property<span style="font-weight: bold; color: black;">&gt;</span></span></span>
...</pre></div></div>

<p><code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\xplanner\WEB-INF\jsp\common\WEB-INF\jsp\common\footer.jsp</code> line 43. From:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean:message</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;footer.message&quot;</span> 
        arg0=<span style="color: #ff0000;">&quot;&lt;%=productionSupportEmail%&gt;</span></span>&quot; 
        arg1=&quot;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>%=issueLink%<span style="font-weight: bold; color: black;">&gt;</span></span>&quot; 
        arg2=&quot;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>%=appUrl+<span style="color: #ff0000;">&quot;/do/systemInfo&quot;</span>%<span style="font-weight: bold; color: black;">&gt;</span></span>&quot;/&gt;
...</pre></div></div>

<p>to:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;bean:message</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;footer.message&quot;</span> 
        arg0=<span style="color: #ff0000;">&quot;&lt;%=productionSupportEmail%&gt;</span></span>&quot; 
        arg1=&quot;<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>%=issueLink%<span style="font-weight: bold; color: black;">&gt;</span></span>&quot; 
        arg2='<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;</span>%=appUrl+<span style="color: #ff0000;">&quot;/do/systemInfo&quot;</span>%<span style="font-weight: bold; color: black;">&gt;</span></span>'/&gt;
...</pre></div></div>

<p><code>C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\xplanner\WEB-INF\jsp\view\notes.jsp</code> line 86. From:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xplanner:link</span> <span style="color: #000066;">page</span>=<span style="color: #ff0000;">&quot;/do/delete/note&quot;</span> <span style="color: #000066;">onclick</span>=<span style="color: #ff0000;">'&lt;%=&quot;return confirm('</span>Do you want to delete note \\\\<span style="color: #ff0000;">'&quot; + StringUtilities.replaceQuotationMarks(StringEscapeUtils.escapeJavaScript(note.getSubject())) + &quot;\\\\'</span>?<span style="color: #ff0000;">')&quot;%&gt;</span></span>'&gt;
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;html:img</span> <span style="color: #000066;">page</span>=<span style="color: #ff0000;">&quot;/images/delete.gif&quot;</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;delete&quot;</span> <span style="color: #000066;">border</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xplanner:linkParam</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;oid&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;note&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;id&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/xplanner:link<span style="font-weight: bold; color: black;">&gt;</span></span></span>
...</pre></div></div>

<p>to:</p>

<div class="wp_syntax"><div class="code"><pre class="xml">...
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xplanner:link</span> <span style="color: #000066;">page</span>=<span style="color: #ff0000;">&quot;/do/delete/note&quot;</span><span style="font-weight: bold; color: black;">&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;html:img</span> <span style="color: #000066;">page</span>=<span style="color: #ff0000;">&quot;/images/delete.gif&quot;</span> <span style="color: #000066;">alt</span>=<span style="color: #ff0000;">&quot;delete&quot;</span> <span style="color: #000066;">border</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
    <span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;xplanner:linkParam</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;oid&quot;</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;note&quot;</span> <span style="color: #000066;">property</span>=<span style="color: #ff0000;">&quot;id&quot;</span><span style="font-weight: bold; color: black;">/&gt;</span></span>
<span style="color: #009900;"><span style="font-weight: bold; color: black;">&lt;/xplanner:link<span style="font-weight: bold; color: black;">&gt;</span></span></span>
...</pre></div></div>

<p>Note that this removes the confirmation of deleting comments in XPlanner.</p>
<h4>Start XPlanner</h4>
<p>The last step is to start XPlanner from the Tomcat Web Application Manager.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=84</wfw:commentRss>
		</item>
		<item>
		<title>Tanker rundt implementasjon av ESXi i mitt LAN</title>
		<link>http://www.kkj.no/blog/?p=9</link>
		<comments>http://www.kkj.no/blog/?p=9#comments</comments>
		<pubDate>Fri, 15 Aug 2008 21:09:37 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[iSCSI]]></category>

		<category><![CDATA[NBD]]></category>

		<category><![CDATA[Openfiler]]></category>

		<category><![CDATA[virtualization]]></category>

		<category><![CDATA[VMware ESXi]]></category>

		<category><![CDATA[VMware Server]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=9</guid>
		<description><![CDATA[For ikke lenge siden lastet jeg ned VMware ESXi. En del spam fra VMware om viktige oppdateringer de siste dagene har minnet meg på at jeg er nødt til å se nærmere på ESXi. I dag slettet jeg den gamle ISO&#8211;en og lastet ned siste versjon.
Disse to videoklippene gir en fin introduksjon til ESXi:

VMware Server [...]]]></description>
			<content:encoded><![CDATA[<p>For ikke lenge siden lastet jeg ned <a href="http://www.vmware.com/products/esxi/">VMware ESXi</a>. En del spam fra VMware om viktige oppdateringer de siste dagene har minnet meg på at jeg er nødt til å se nærmere på ESXi. I dag slettet jeg den gamle ISO&ndash;en og lastet ned siste versjon.</p>
<p>Disse to videoklippene gir en fin introduksjon til ESXi:</p>
<ul>
<li><a href="http://www.youtube.com/watch?v=6aJEXaoq_B4">VMware Server Virtualization - ESXi Server now FREE!</a></li>
<li><a href="http://www.youtube.com/watch?v=GC-_MW8kuzQ">VMware ESXi Server Virtualization Walkthrough</a></li>
</ul>
<p>For øyeblikket kjører jeg <a href="http://www.vmware.com/products/server/">VMware Server</a> på serveren min som er en AMD Athlon 64 X2 4600+ med 4GB RAM og seks disker. Ved hjelp av <code><a href="http://en.wikipedia.org/wiki/Mdadm">mdadm</a></code> har jeg satt opp 3 av diskene i et <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_5">RAID 5</a> array som gir 1TB redundant data. Host OS er <a href="http://www.ubuntu.com/products/WhatIsUbuntu/serveredition">Ubuntu Server Edition 6.10</a>.</p>
<p>Etter å ha diskutert litt på IRC&ndash;kanalen <a href="http://www.linuxguiden.no/index.php/Linuxhelp.no">#linuxhelp.no</a> og sett videoklippene på YouTube så er jeg blitt overbevist om at det lønner seg å bytte ut VMware Server med VMware ESXi. Det er imidlertid et problem. ESXi støtter ikke software RAID. Mine undersøkelser rotet meg borti tanker rundt:</p>
<ol>
<li><a href="#iscsi">Internet SCSI protocol (iSCSI)</a></il>
<li><a href="#openfiler">Openfiler</a></li>
<li><a href="#nbd">Network block device (NBD)</a></li>
<li><a href="#controller">RAID kontroller</a></li>
</ol>
<h4 id="iscsi">1. Internet SCSI protocol (iSCSI)</h4>
<p>iSCSI er en protokoll der SCSI kommandoer blir sendt over TCP. ESXi støtter denne protokollen. Jeg kunne derfor ha satt opp en ny server med Ubuntu Server Edition og RAID 5. Deretter kunne jeg gjort diskene tilgjengelig for ESXi&ndash;serveren ved hjelp av iSCSI, og på den måten hatt redundans på mine virtuelle maskiner. Det finnes også ferdige <a href="http://www.promise.com/marketing/Landing%20Pages/iSCSI%20Landing%20Page/iSCSI.asp">&#8220;iSCSI and IP SAN solutions&#8221;</a> der ute som dessverre ikke er et reelt alternativ for meg. Snufs. iSCSI virker lovende, men på grunn av at jeg trenger en ekstra fysisk server så er ikke dette løsningen for meg.</p>
<p>For mer informasjon se:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Iscsi">http://en.wikipedia.org/wiki/Iscsi</a></li>
</ul>
<h4 id="openfiler">2. Openfiler</h4>
<p>Openfiler er et operativsystem spesielt egnet for å dele data. Støttede protokoller er blant annet:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Network_file_system">Network file system (NFS)</a></li>
<li><a href="http://en.wikipedia.org/wiki/Server_Message_Block">Server Message Block (SMB)/Common Internet File System (CIFS)</a></li>
<li><a href="http://en.wikipedia.org/wiki/Http">Hypertext Transfer Protocol (HTTP)</a>/<a href="http://en.wikipedia.org/wiki/Webdav">Web-based Distributed Authoring and Versioning (WebDAV)</a></li>
<li><a href="http://en.wikipedia.org/wiki/Ftp">File Transfer Protocol (FTP)</a></li>
<li>Internet SCSI protocol</li>
</ul>
<p>Openfiler virker som et lovende operativsystem, og jeg er absolutt nødt til å teste det. En server med Openfiler og en med ESXi hadde vært en meget spennende løsning, men igjen siden jeg trenger en ekstra server så er ikke dette et alternativ for meg.</p>
<p>For mer informasjon om Openfiler se:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Openfiler">http://en.wikipedia.org/wiki/Openfiler</a></li>
<li><a href="http://www.openfiler.com/">http://www.openfiler.com/</a></li>
</ul>
<h4 id="nbd">3. Network block device</h4>
<p>Ved hjelp av NBD så kan man mounte devicer som ligger på andre maskiner. Dette alternativet fører også til at jeg måtte ha hatt en ekstra server.</p>
<p>For mer informasjon se:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Network_block_device">http://en.wikipedia.org/wiki/Network_block_device</a></li>
</ul>
<h4 id="controller">4. RAID kontroller</h4>
<p>Det billigste og mest miljøvennlige alternativet er uten tvil å kjøpe meg en RAID kontroller som <a href="http://www.vmware.com/pdf/vi35_io_guide.pdf">støttes av ESXi</a>. Det kan se ut som det kan bli <a href="http://prisguide.hardware.no/product.php?productId=68591">Adaptec RAID 3805</a>. Kortet koster en formue så det blir nok VMware server en stund til. Snufs.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=9</wfw:commentRss>
		</item>
		<item>
		<title>PHPFeedSync</title>
		<link>http://www.kkj.no/blog/?p=3</link>
		<comments>http://www.kkj.no/blog/?p=3#comments</comments>
		<pubDate>Sat, 05 Jul 2008 23:58:33 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Project]]></category>

		<category><![CDATA[Atom]]></category>

		<category><![CDATA[FeedSync]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[synchronisation]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=3</guid>
		<description><![CDATA[Today I released my first open source project. The PHPFeedSync project aims to be a complete PHP implementation of the FeedSync protocol. You can find the project here: http://www.codeplex.com/phpfeedsync/.
]]></description>
			<content:encoded><![CDATA[<p>Today I released my first open source project. The PHPFeedSync project aims to be a complete PHP implementation of the FeedSync protocol. You can find the project here: <a href="http://www.codeplex.com/phpfeedsync/">http://www.codeplex.com/phpfeedsync/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=3</wfw:commentRss>
		</item>
		<item>
		<title>Some floating issues</title>
		<link>http://www.kkj.no/blog/?p=42</link>
		<comments>http://www.kkj.no/blog/?p=42#comments</comments>
		<pubDate>Fri, 17 Aug 2007 22:00:05 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Web technology]]></category>

		<category><![CDATA[CSS]]></category>

		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=42</guid>
		<description><![CDATA[I have written an article that shed light on some floating issues. Take a look if it interests you.
]]></description>
			<content:encoded><![CDATA[<p>I have written an article that shed light on some floating issues. <a href="http://www.kkj.no/misc/floating.html">Take a look</a> if it interests you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=42</wfw:commentRss>
		</item>
		<item>
		<title>Informasjon til arbeidsgiver</title>
		<link>http://www.kkj.no/blog/?p=48</link>
		<comments>http://www.kkj.no/blog/?p=48#comments</comments>
		<pubDate>Thu, 29 Mar 2007 22:00:51 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Career]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=48</guid>
		<description><![CDATA[Nøkkelkompetanse

XML-teknologier
PHP, Java, C#, .NET
Microsoft Visual C# 2005 Express edition (Visual Studio) 
HTML, CSS, JavaScript/JScript (ECMAScript)
Adobe Creative Suite 2
Linux, Apache, MySQL
SMS

Hovedfokus
Hovedfokus i prioritert rekkefølge: 

Brukervennlighet
Gjenbrukbar data
Dataformater
Gjenbrukbar kode

]]></description>
			<content:encoded><![CDATA[<h4>Nøkkelkompetanse</h4>
<ul>
<li>XML-teknologier</li>
<li>PHP, Java, C#, .NET</li>
<li>Microsoft Visual C# 2005 Express edition (Visual Studio) </li>
<li>HTML, CSS, JavaScript/JScript (ECMAScript)</li>
<li>Adobe Creative Suite 2</li>
<li>Linux, Apache, MySQL</li>
<li>SMS</li>
</ul>
<h4>Hovedfokus</h4>
<p>Hovedfokus i prioritert rekkefølge: </p>
<ol>
<li>Brukervennlighet</li>
<li>Gjenbrukbar data</li>
<li>Dataformater</li>
<li>Gjenbrukbar kode</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=48</wfw:commentRss>
		</item>
		<item>
		<title>Error reporting in PHP</title>
		<link>http://www.kkj.no/blog/?p=4</link>
		<comments>http://www.kkj.no/blog/?p=4#comments</comments>
		<pubDate>Wed, 21 Mar 2007 00:00:00 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Web technology]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=4</guid>
		<description><![CDATA[Some way down the road the default php.ini started to get shipped with settings that stopped the error printing. The default location of this file is /usr/local/lib/php.ini, and the most common settings that controls the error reporting behaviour is listed below:
error_reporting = E_ALL &#124; E_ERROR &#124; ... &#124; E_USER_NOTICE
display_errors = On &#124; Off
log_errors = On [...]]]></description>
			<content:encoded><![CDATA[<p>Some way down the road the default <code>php.ini</code> started to get shipped with settings that stopped the error printing. The default location of this file is <code>/usr/local/lib/php.ini</code>, and the most common settings that controls the error reporting behaviour is listed below:</p>
<pre>error_reporting = E_ALL | E_ERROR | ... | E_USER_NOTICE
display_errors = On | Off
log_errors = On | Off</pre>
<p>First of all error_reporting decides what type of errors or messages that will be taken care of in the first place. See <code>php.ini</code> for details. Then you have the options to:</p>
<ol>
<li>Print the error as part of the HTML by setting <code>display_errors</code> to <code>On</code></li>
<li>Log the error to Apaches <code>error_log</code> by setting <code>log_errors</code> to <code>On</code></li>
<li>Or both print and log the errors and messages</li>
</ol>
<p>There is a reason why they stopped to display errors as a default thing. This is because you are risking to leak sensitive information about your server configuration. A way to achive instant information about errors, and keep the rest of your web site safe, is to alter the settings for just the scripts you are working with at run time. It can be done like this:</p>

<div class="wp_syntax"><div class="code"><pre class="php"><span style="color: #990000;">ini_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'display_errors'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'On'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">error_reporting</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">E_ALL</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<h4>Suggested readings:</h4>
<ul>
<li>Comments in php.ini section about error reporting</li>
<li><a href="http://no.php.net/manual/en/function.error-reporting.php">PHP Manual: error_reporting</a></li>
<li><a href="http://no.php.net/manual/en/function.ini-set.php">PHP Manual: ini_set</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=4</wfw:commentRss>
		</item>
		<item>
		<title>Character encodings by example</title>
		<link>http://www.kkj.no/blog/?p=53</link>
		<comments>http://www.kkj.no/blog/?p=53#comments</comments>
		<pubDate>Mon, 19 Mar 2007 22:00:28 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Data formats]]></category>

		<category><![CDATA[ANSI]]></category>

		<category><![CDATA[character encoding]]></category>

		<category><![CDATA[character map]]></category>

		<category><![CDATA[Java]]></category>

		<category><![CDATA[Latin-1]]></category>

		<category><![CDATA[Unicode]]></category>

		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=53</guid>
		<description><![CDATA[In this text I asume you have a basic understanding of character sets. Take a look at the reference section if you need to take a look into that area. You can use the code charts at http://www.unicode.org/charts/ to see the code points of the characters we will use. I use Microsoft Calculator to convert [...]]]></description>
			<content:encoded><![CDATA[<p>In this text I asume you have a basic understanding of <em>character sets</em>. Take a look at the reference section if you need to take a look into that area. You can use the code charts at <a href="http://www.unicode.org/charts/">http://www.unicode.org/charts/</a> to see the <em>code points</em> of the characters we will use. I use Microsoft Calculator to convert between hex, decimal and binary numbers. </p>
<p>In this example we will write a Java program that writes bytes to text files. The files will consist of characters <em>encoded</em> in ISO&ndash;8859&ndash;1 (Latin&ndash;1) and the UTF&ndash;8 encoding of the Unicode character set. We will use Microsoft Notepad, to view these files. </p>
<h4>The Java program</h4>
<p>The program below takes a file name and binary strings as arguments. Each binary string represents one byte in the text file, so make sure not to exceed a string length of 8 to get expected results. If you want to you can modify the main method to use decimal numbers instead.</p>

<div class="wp_syntax"><div class="code"><pre class="java"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.io.*</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Bits <span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> <span style="color: #003399;">Exception</span> <span style="color: #009900;">&#123;</span>	
	<span style="color: #003399;">FileOutputStream</span> out <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">FileOutputStream</span><span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> args.<span style="color: #006633;">length</span><span style="color: #339933;">;</span> i<span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	    <span style="color: #000066; font-weight: bold;">int</span> bits <span style="color: #339933;">=</span> <span style="color: #003399;">Integer</span>.<span style="color: #006633;">parseInt</span><span style="color: #009900;">&#40;</span>args<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>,<span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Byte &quot;</span> <span style="color: #339933;">+</span> i <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot;: &quot;</span> <span style="color: #339933;">+</span> args<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span> <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">print</span><span style="color: #009900;">&#40;</span>bits <span style="color: #339933;">+</span> <span style="color: #0000ff;">&quot; &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    <span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span>.<span style="color: #006633;">toHexString</span><span style="color: #009900;">&#40;</span>bits<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	    out.<span style="color: #006633;">write</span><span style="color: #009900;">&#40;</span>bits<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	out.<span style="color: #006633;">close</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h4>Example 1</h4>
<p>Find the character A in the <a href="http://www.unicode.org/charts/PDF/U0000.pdf">Basic Latin code chart</a>. Notice it has the hexadecimal code point <code>0041</code> or if converted the binary code point <code>1000001</code>. Lets write a byte with this value to the text file <code>example1.txt</code>:</p>
<pre>java Bits example1.txt 1000001</pre>
<p>If you open the file with Microsoft Notepad you will see that it contains the letter A as expected. If you pick save as from the menu you can see that notepad suggests the <a href="http://en.wikipedia.org/wiki/Ansi">ANSI</a> encoding. ANSI is an <a href="http://en.wikipedia.org/wiki/Extended_ASCII">extended ASCII</a> encoding, as is Latin&ndash;1. ANSI and Latin&ndash;1 has differences, but we will use characters that are encoded the same way for both encodings. So just think of ANSI as Latin-1 throughout the text.</p>
<h4>Example 2</h4>
<p>Click the save as option in the notepad menu. Save <code>example1.txt</code> as <code>example2.txt</code> with the UTF&ndash;8 encoding. Take a look at the file properties of the newly created file. Notice that it has a size of 4 bytes, but if you open it again it still contains the lonely letter A. The 3 new bytes are located at the beginning of the file, and is the <a href="http://en.wikipedia.org/wiki/Byte_Order_Mark">Byte Order Mark (BOM)</a> for the UTF&ndash;8 encoding. The BOM is the only way for notepad to know that this is a text document encoded in UTF&ndash;8, and not Latin&ndash;1. This is because the character A is encoded the same way for both encodings. Let&#8217;s create <code>example2.txt</code> manually:</p>
<pre>java Bits example2.txt 11101111 10111011 10111111 1000001</pre>
<h4>Example 3</h4>
<p>Let&#8217;s try to encode a character that is encoded differently in the two encodings. Below we make three text files with the Norwegian letter Å. One encoded in Latin&ndash;1, the second in UTF&ndash;8 and the last one in UTF&ndash;8 too, but without the BOM. The <a href="http://www.unicode.org/charts/PDF/U0080.pdf">Latin-1 chart</a> tells us that Å has the hexadecimal code point <code>00C5</code>. If we convert it using Microsoft Calculator we get the binary string <code>11000101</code> or the decimal number <code>197</code>. </p>
<pre>java Bits example3-1.txt 11000101
java Bits example3-2.txt 11101111 10111011 10111111 11000011 10000101
java Bits example3-3.txt 11000011 10000101</pre>
<p>Notice that notepad recognizes the UTF&ndash;8 encoded Å in <code>example3-3.txt</code> even though we left out the BOM. Also notice that we need two bytes to encode Å in UTF&ndash;8. Some characters in UTF&ndash;8 is even encoded in four bytes. The combination of the two bytes <code>11000011</code> and <code>10000101</code> is decoded into the code point <code>197</code> when read. <code>197</code> references the letter Å for both the Unicode and the Latin&ndash;1 character set. </p>
<p>Now I hope you have a better understanding of how characters are encoded. If you want to know more you could take a look at the suggested readings. I personally recommend the XML in a Nutshell book. It&#8217;s almost everything you need.</p>
<h4>Suggested readings</h4>
<ul>
<li><a href="http://en.wikipedia.org/wiki/ASCII">ASCII</a></li>
<li><a href="http://en.wikipedia.org/wiki/Byte_Order_Mark">Byte Order Mark (BOM)</a></li>
<li><a href="http://en.wikipedia.org/wiki/Character_encoding">Character encoding</a></li>
<li><a href="http://www.unicode.org/charts/">Code Charts</a></li>
<li><a href="http://en.wikipedia.org/wiki/Extended_ASCII">Extended ASCII</a></li>
<li><a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a></li>
<li><a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a></li>
<li><a href="http://en.wikipedia.org/wiki/Ansi">Windows code page</a></li>
<li><a href="http://www.amazon.com/gp/product/0596007647/sr=8-2/qid=1152198748/ref=pd_bbs_2/102-3970295-7713728?ie=UTF8">XML in a Nutshell, Third Edition (Paperback)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=53</wfw:commentRss>
		</item>
		<item>
		<title>Påska 2007 i Lofoten</title>
		<link>http://www.kkj.no/blog/?p=77</link>
		<comments>http://www.kkj.no/blog/?p=77#comments</comments>
		<pubDate>Thu, 08 Mar 2007 22:00:50 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Holiday]]></category>

		<category><![CDATA[Personal]]></category>

		<category><![CDATA[DokuWiki]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=77</guid>
		<description><![CDATA[I år har jeg vært i Lofoten i påska. Det har vært et fryktelig vær stort sett hele tia, så det har vært mye innesitting. 
Jeg bestilte 3 stk Scythe Ninja Plus før påske. Tok med meg den ene av disse siden den var bestilt til min lillebror Terje. Kjøleren var mye større enn jeg [...]]]></description>
			<content:encoded><![CDATA[<p>I år har jeg vært i Lofoten i påska. Det har vært et fryktelig vær stort sett hele tia, så det har vært mye innesitting. </p>
<p>Jeg bestilte 3 stk <a href="http://prisguide.hardware.no/product.php?productId=54618">Scythe Ninja</a> Plus før påske. Tok med meg den ene av disse siden den var bestilt til min lillebror Terje. Kjøleren var mye større enn jeg hadde forventet, og den lot seg montere uten problemer. </p>
<p>På tirsdag kjørte Ramona, Per Ole, Terje og jeg til Bø. Jeg var litt i ura å så på gamle lekeplasser innimellom steinene. De er selvsagt mindre i dag enn de var på den tid, og jeg tok meg opp på den største og hoppet ned. Litt stolt, for det var litt skummelt. Det hadde jeg neppe gjort i gamle dager. Vi var også en tur på Ramberg der vi blant annet inspiserte bua til onkel Jan. </p>
<p>Jeg har jobbet en del med funksjonaliteten i bloggen min i påska. Har fått på plass paging, støtte for tags og kategorisering. Når det gjelder den siste så &#8220;mounter&#8221; jeg poster i kategoritreet. Jeg kan mounte samme post flere plasser. </p>
<p>Jeg har lenge tenkt på å finne meg en wiki som er enkel å bruke, og som ikke trenger database. Etter litt fram og tilbake fant jeg siden <a href="http://www.wikimatrix.org/">WikiMatrix</a> som er et veldig bra verktøy for å finne wikier ut fra forskjellige behov. Fikk opp en liste med ca 10 wikier som samsvarte med mine ønsker, og etter å ha forhørt meg litt på IRC så gikk jeg for DokuWiki. Jeg var ikke helt fornøyd meg standard utseende på DokuWiki og lagde derfor en egen template. Jeg har kalt malen for &#8220;LessWiki&#8221; siden jeg blant annet har fjernet en del knapper som jeg syntes var forstyrrende. Jeg har også prøvd å gjøre innholdet mer lesbart ved å minske bredden på området med tekst til rundt 500 piksler. Du kan laste ned malen <a href="http://www.kkj.no/files/lesswiki-1.0.tar.gz">her</a>. Jeg har opprettet en wiki som jeg kan bruke til forskjellig <a href="http://www.kkj.no/wiki/">her</a>. </p>
<p>På langfredag dristet vi oss ut i skitværet og kjørte til Voll. Der fikk jeg for første gang sett melkeroboten in action. Imponerende sak. Med denne blir kyrne automatisk melket. Før kyrne melkes blir de ledet inn til roboten ved hjelp av en databrikke som åpner portene slik at kyrne kommer seg inn på rett plass. Denne brikken sørger også for at det blir delt ut riktig mengde for på kraftforstasjonen. </p>
<p>På lørdag var vi en tur hos onkel Arne. Der installerte vi VMware, og installerte så openSUSE i en virtuell maskin. Så så vi litt på OpenOffice og både pappa og onkel syntes det så greit nok ut til at de ønsket å teste det. Vi fikk også CD-spiller med MP3-støtte hos Arne til bilen. Dermed slapp vi den lange kjøreturen til Tromsø i taushet. </p>
<p>Senere på lørdag rippet pappa og jeg litt musikk, slik at jeg fikk vist han litt av biblioteksfunksjonene i Windows Media Player 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=77</wfw:commentRss>
		</item>
		<item>
		<title>Replay Manager</title>
		<link>http://www.kkj.no/blog/?p=70</link>
		<comments>http://www.kkj.no/blog/?p=70#comments</comments>
		<pubDate>Sat, 13 Jan 2007 22:00:24 +0000</pubDate>
		<dc:creator>Knut Kristian Johansen</dc:creator>
		
		<category><![CDATA[Project]]></category>

		<category><![CDATA[.NET]]></category>

		<category><![CDATA[C#]]></category>

		<category><![CDATA[DOM]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Services]]></category>

		<category><![CDATA[XML]]></category>

		<category><![CDATA[XPath]]></category>

		<category><![CDATA[XSLT]]></category>

		<guid isPermaLink="false">http://www.kkj.no/blog2/?p=70</guid>
		<description><![CDATA[Replay Manager er en Windows-applikasjon som jeg har skrevet i C#. Utviklingsverktøyet jeg har brukt er Microsoft Visual C# 2005 Express edition. 
Warcraft III er et mye spilt real time strategy spill. Når man er ferdig med en omgang av spillet så lagres kampen automatisk i fila LastReplay.w3g. Denne fila overskrives for hver omgang. Derfor [...]]]></description>
			<content:encoded><![CDATA[<p>Replay Manager er en Windows-applikasjon som jeg har skrevet i C#. Utviklingsverktøyet jeg har brukt er <a href="http://msdn.microsoft.com/vstudio/express/visualcsharp/">Microsoft Visual C# 2005 Express edition</a>. </p>
<p><a href="http://blizzard.com/war3x/">Warcraft III</a> er et mye spilt real time strategy spill. Når man er ferdig med en omgang av spillet så lagres kampen automatisk i fila <code>LastReplay.w3g</code>. Denne fila overskrives for hver omgang. Derfor må man ta en kopi av fila hvis man ønsker å bevare kampen, før man setter i gang med en ny. Det finnes utallige websider der man kan laste ned meget underholdende kamper mellom verdens beste spillere. </p>
<p>Replay Manager lagrer og organiserer Warcraft III replays automatisk. Måten dette gjøres på er å først overvåke fila <code>LastReplay.w3g</code>. Hvis denne endres på noen måte så tas det en kopi. Replay Manager sender så fila til en web service på <a href="http://wcportal.net/">wcportal.net</a> som jeg har utviklet i PHP5. Fila parses av en <a href="http://toya.net.pl/~julas/w3g/">parser</a> utviklet i PHP av Juliusz Gonera. Web servicen henter så ut parset informasjon, og sender denne tilbake i XML format til Replay Manager. Denne informasjonen lagres så i ei XML-fil på klientmaskinen. <a href="http://www.kkj.no/misc/replay2.xml">Her</a> kan du se et eksempel på ei slik fil. Replay&ndash;fila får nytt navn basert på parset informasjon. Fila blir også registrert i et register som Replay Manager bruker for å holde oversikt over replays på maskinen. </p>
<p>I selve applikasjonen finner man to <code><a href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.webbrowser.aspx">WebBrowser</a></code>&ndash;kontroller. I den venstre finner man ei liste med replays fra replay-registeret. Klikker man på en av disse så vises detaljer i browseren til høyre. Replay Manager bruker registeret, XML&ndash;fila som ble generert av Web Servicen og ei <a href="http://www.kkj.no/misc/stylesheet.xslt">XSLT&ndash;fil</a> for å generere lista og <a href="http://www.kkj.no/misc/replay.php">detaljvisningen</a>. Høyreklikk og &#8220;save target as&#8221; hvis du har problemer med å få sett XSLT&ndash;fila på en skikkelig måte. </p>
<p>Programmet har også andre funksjoner som å laste opp replays til wcportal.net, vise fram RSS fra wcportal.net, med mer. </p>
<p>Replay Manager er ikke ferdig utviklet, men kan demonstreres for interessert arbeidsgiver. Send meg en e&ndash;post hvis du ønsker mer informasjon. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.kkj.no/blog/?feed=rss2&amp;p=70</wfw:commentRss>
		</item>
	</channel>
</rss>
