<?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>blog.haraldkraft.de &#187; Technical</title>
	<atom:link href="http://blog.haraldkraft.de/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.haraldkraft.de</link>
	<description>Blog Project of Harald Kraft</description>
	<lastBuildDate>Tue, 17 Jan 2012 16:46:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Updated and unified version of standalone SMS extractor for iPhone</title>
		<link>http://blog.haraldkraft.de/2012/01/updated-and-unified-version-of-standalone-sms-extractor-for-iphone/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=updated-and-unified-version-of-standalone-sms-extractor-for-iphone</link>
		<comments>http://blog.haraldkraft.de/2012/01/updated-and-unified-version-of-standalone-sms-extractor-for-iphone/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 22:21:14 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Life and People]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[standalone]]></category>
		<category><![CDATA[text messages]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=453</guid>
		<description><![CDATA[Last year I released a script written in PHP which was able to extract text messages from the iPhone (more specifically: from the SQLite storage container) into a simple TXT file, which was documented in this blog post. The software required a PHP interpreter, which had to be cared for by the user (check the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Last year I released a script written in PHP which was able to extract text messages from the iPhone (more specifically: from the SQLite storage container) into a simple TXT file, which was documented in <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAv" title=\"SMS Extractor for iPhone (written in PHP)\">this blog post</a>. The software required a PHP interpreter, which had to be cared for by the user (check the blog post for details), but was published under <em>CC BY 3.0</em> so the user could make any alteration he desired or deemed necessary.<br />
Some time later I wrote an <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hhcmFsZGtyYWZ0LmRlL3Ntcy1leHRyYWN0b3Iv" title=\"SMS / text message extraction from iPhone\">online version</a> of the extractor (<a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNi9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAtb25saW5lLXZlcnNpb24v" title=\"Free SMS Extractor for iPhone (written in PHP) – online version\">release blog post</a>), which offered extended functionality and above all no longer needed the user to run the interpreter him- or herself.<br />
However, due to the lack of time I couldn&#8217;t keep the standalone version up to date with the online version and so they diverged.</p>
<p><span id="more-453"></span></p>
<p style="text-align: justify;">As of now I am publishing the updated code of the standalone version, which has partially been re-written in two ways: for one it now comprises of the same functionality as the online version, and for another the coding structure has been reorganized so I can keep the two versions in unison easier. This means that any update or change made to the software will be applied to both versions: the online version will make use of the update whereas the standalone version will be published open source under the same license with the updated code.</p>
<p style="text-align: center;">You can download the updated code <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvP2F0dGFjaG1lbnRfaWQ9NDY0">here</a>.</p>
<p style="text-align: center;"><a rel=\"license\" href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnkvMy4wLw=="><img style="border-width: 0;" src="http://i.creativecommons.org/l/by/3.0/88x31.png" alt="Creative Commons License" /></a><br />
This work is licensed under a <a rel=\"license\" href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnkvMy4wLw==">Creative Commons Attribution 3.0 Unported License</a>.</p>
<p style="text-align: justify;">Let me quickly list the options which the new standalone version offers (i.e. the differences to the original publication), which are about user customizations:</p>
<ul>
<li><strong>$OUTFILE_TYPE = &#8220;TXT&#8221;</strong><br />
defines whether the type of the output should be in text (<em>TXT</em>) or comma-separated values (<em>CSV</em>). Please note that the file extension you define for <em>$OUTFILE</em> as part of the filename is not taken into consideration; so  e.g. if you want to output a CSV file, setting the outfile name to &#8220;outfile.csv&#8221; is not enough, you need to specifically set <em>$OUTFILE_TYPE</em> to CSV.</li>
<li><strong>$NEWLINE = &#8220;\n&#8221;</strong><br />
defines the format of the system dependent newline. Use <em>\r\n</em> on Windows and <em>\n</em> on Unix/Linux and Mac.</li>
<li>default file opening mode is now &#8220;overwrite&#8221; ( <strong>$f_handle = fopen( $OUTFILE, “w” );</strong> ). If you would like to append extracted text message to the output file rather than overwrite the file use &#8220;<em>a</em>&#8221; instead of &#8220;<em>w</em>&#8220;. Note that the line now moved towards the end of the file.</li>
<li>Change format of output of single text messages<br />
In case of <em>TXT</em> you need to change <strong>$OUTSTRING .= &#8220;$time$senderror$NEWLINE$address$NEWLINE$text$NEWLINE$NEWLINE$NEWLINE&#8221;;</strong> to your liking and in case of <em>CSV</em> change <strong>$OUTSTRING .= &#8220;$address,$time,\&#8221;" . str_replace( &#8220;\&#8221;", &#8220;\&#8221;\&#8221;", $text) . &#8220;\&#8221;$NEWLINE&#8221;;</strong>.<br />
Make sure you only change the format string and leave the <strong>.=</strong> intact <img src='http://blog.haraldkraft.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</li>
</ul>
<p style="text-align: justify;">If you are a new user to this and don&#8217;t know what to do about the <em>user specific CONFIGURATION</em> section or how to run the script, please refer to the <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAv" title=\"SMS Extractor for iPhone (written in PHP)\">original blog post</a>, which explains in detail how the standalone version works.</p>
<p style="text-align: justify;">As always you can <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=bWFpbHRvOiU2MiU2QyU2RiU2NyU0MCU2OCU2MSU3MiU2MSU2QyU2NCU2QiU3MiU2MSU2NiU3NCUyRSU2NCU2NQ==">contact me</a> with any remarks you would like to bring to my attention.</p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=453" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2012/01/updated-and-unified-version-of-standalone-sms-extractor-for-iphone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firebug&#8217;s &#8220;Aborted&#8221; message upon AJAX request</title>
		<link>http://blog.haraldkraft.de/2011/12/firebugs-aborted-message-upon-ajax-request/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=firebugs-aborted-message-upon-ajax-request</link>
		<comments>http://blog.haraldkraft.de/2011/12/firebugs-aborted-message-upon-ajax-request/#comments</comments>
		<pubDate>Tue, 27 Dec 2011 14:08:57 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[aborted]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[dragonfly]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[xml http request]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=418</guid>
		<description><![CDATA[A while ago I encountered this error in Firebug during my work with AJAX techniques but never really documented it &#8211; so here we go. The scenario is simple: a number of asynchronous requests are done via JavaScript and many of them Firebug will list as Aborted. I attached screenshots below. What seemed mysterious was [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">A while ago I encountered this error in Firebug during my work with AJAX techniques but never really documented it &#8211; so here we go.</p>
<p style="text-align: justify;">The scenario is simple: a number of asynchronous requests are done via JavaScript and many of them Firebug will list as <em>Aborted</em>. I attached screenshots below.</p>
<p style="text-align: justify;">What seemed mysterious was that these requests were done at completely different locations in the code, which didn&#8217;t have any relation to one another. Furthermore I didn&#8217;t render the fact problematic that some of the requests were shuffled amongst each other &#8211; that&#8217;s what AJAX was for &#8230;</p>
<p><span id="more-418"></span></p>
<p style="text-align: justify;">However &#8211; of course the answer was <em>PEBKAC</em> &#8211; I was using the <strong>same</strong> XMLHttpRequest object from the different locations over and over not caring whether the previous request had returned or not. The browser is left with no other option than to stop the already open request of the object and start a new one. Firebug shows this behavior by the label &#8220;Aborted&#8221; in the HTTP Status column, I don&#8217;t think this is a term used in the standards. For example Opera&#8217;s Dragonfly calls it &#8220;n/a&#8221;, which is probably even more correct in ways of &#8220;the HTTP status code is not available&#8221;, but does not give the developer any clue about what happened.</p>
<p style="text-align: justify;">Bottom line: I encountered many &#8220;Aborted&#8221; messages in Firebug with AJAX because I was using the same XHR object for simultaneous connections. Maybe some other folks with the same problem will stumble across this blog and find peace <img src='http://blog.haraldkraft.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
<p style="text-align: justify;">Here is an simple example of how to reproduce the issue:</p>
<ul>
<li>A minimal HTML page including the separate Javascript file and calling an entry function <em>wrapper( )</em> on load:</li>
<p><pre><code>&lt;!DOCTYPE html&gt;
    
&lt;html&gt;  
    &lt;head&gt;
        &lt;title&gt;Testpage for firebug abort problem&lt;/title&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;./script.js&quot;&gt;&lt;/script&gt;
    &lt;/head&gt;

    &lt;body onload=&quot;wrapper();&quot;&gt;
        &lt;div&gt;
            &lt;h1&gt;testpage for firebug abort problem&lt;/h1&gt;
        &lt;/div&gt;
    &lt;/body&gt;
&lt;/html&gt;</code></pre></p>
<li>A separate JavaScript file with the entry function that will call the interfering procedures. The procedures have to be called asynchronously (third parameter of <em>open( )</em> is set to <em>true</em>) otherwise the browser would wait for the return (or a browser specific timeout):</li>
<p><pre><code>function createRequestObject() {
    if( navigator.appName == &quot;Microsoft Internet Explorer&quot; ) {
        return new ActiveXObject( &quot;Microsoft.XMLHTTP&quot; );
    }
    
    return new XMLHttpRequest();
}

var xhttp = createRequestObject();
        
function wrapper() {
    ajax_sleep( 5 );
    ajax_sleep( 1 );
    ajax_sleep( 1 );
}

function ajax_sleep( seconds ) {
    xhttp.open( &quot;GET&quot;, &quot;./sleep.php?seconds=&quot;+seconds, true );
    xhttp.onreadystatechange = handleResponse;
    xhttp.send(null);
}

function handleResponse() {
    if( xhttp.readyState == 4 ) {
        var response = xhttp.responseText;
        alert( response );
    }
}</code></pre></p>
<li>An external PHP script that will do nothing but sleep for the expected amount of seconds:</li>
<p><pre><code>&lt;?php

$seconds = $_GET['seconds'];
sleep( $seconds );

print( &quot;slept for $seconds sec(s)&quot; );

?&gt;</code></pre>
</ul>
<p>And here are the screenshots with the mentioned error messages:</p>
<ul>
<li>Firebug console:</li>
<p><a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMTIvZmlyZWJ1Zy1jb25zb2xlLWFqYXgtYWJvcnRlZC5wbmc="><img src="http://blog.haraldkraft.de/wp-content/uploads/2011/12/firebug-console-ajax-aborted-300x49.png" alt="&quot;Aborted&quot; message in Firebug&#039;s console upon AJAX request" title="firebug-console-ajax-aborted" width="300" height="49" class="aligncenter size-medium wp-image-423" /></a></p>
<li>Firebug net view:</li>
<p><a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMTIvZmlyZWJ1Zy1uZXQtYWpheC1hYm9ydGVkLnBuZw=="><img src="http://blog.haraldkraft.de/wp-content/uploads/2011/12/firebug-net-ajax-aborted-300x47.png" alt="&quot;Aborted&quot; message in Firebug&#039;s net view upon AJAX request" title="firebug-net-ajax-aborted" width="300" height="47" class="aligncenter size-medium wp-image-421" /></a></p>
<li>Opera&#8217;s Dragonfly network view:</li>
<p><a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvd3AtY29udGVudC91cGxvYWRzLzIwMTEvMTIvb3BlcmEtZHJhZ29uZmx5LWFqYXgtbi1hLnBuZw=="><img src="http://blog.haraldkraft.de/wp-content/uploads/2011/12/opera-dragonfly-ajax-n-a-300x69.png" alt="&quot;n/a&quot; message in Opera&#039;s Dragonfly network view upon AJAX request" title="opera-dragonfly-ajax-n-a" width="300" height="69" class="aligncenter size-medium wp-image-422" /></a>
</ul>
<p></p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=418" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/12/firebugs-aborted-message-upon-ajax-request/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Correct CSV export for free iPhone SMS extractor</title>
		<link>http://blog.haraldkraft.de/2011/11/correct-csv-export-for-free-iphone-sms-extractor/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=correct-csv-export-for-free-iphone-sms-extractor</link>
		<comments>http://blog.haraldkraft.de/2011/11/correct-csv-export-for-free-iphone-sms-extractor/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 22:39:13 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Life and People]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[csv]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text messages]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=390</guid>
		<description><![CDATA[About half a year ago I published a PHP script that could extract text messages from an iPhone SQLite container. It was followed by an online version (blog post) a few weeks later, which was a website offering to use the original PHP script for text message extraction without having to install and/or run a [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">About half a year ago I <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAv" title=\"SMS Extractor for iPhone (written in PHP)\">published a PHP script</a> that could extract text messages from an iPhone SQLite container. It was followed by an <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hhcmFsZGtyYWZ0LmRlL3Ntcy1leHRyYWN0b3Iv" title=\"SMS / text message extraction from iPhone\">online version</a> (<a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNi9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAtb25saW5lLXZlcnNpb24v" title=\"Free SMS Extractor for iPhone (written in PHP) – online version\">blog post</a>) a few weeks later, which was a website offering to use the original PHP script for text message extraction without having to install and/or run a webserver.</p>
<p><span id="more-390"></span></p>
<p style="text-align: justify;">The online version continued development including security checks and the likes. Until I have more than 24h a day at my disposal, I will continue development on the online version only. The source code for the online version is not yet publicly available (it will be once I merge the two branches), but please do <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=bWFpbHRvOiU2OSU3MCU2OCU2RiU2RSU2NSU0MCU2OCU2MSU3MiU2MSU2QyU2NCU2QiU3MiU2MSU2NiU3NCUyRSU2NCU2NQ==">contact me</a> if you&#8217;re interested.</p>
<p style="text-align: justify;">The current blog post is about a small update that basically fixed the CSV format. Even though there is no &#8220;CSV standard&#8221; and a few different formats in common usage, I am refering to RFC 4180: enclosing text with double quotes and escaping double quotes with themselves.</p>
<p style="text-align: justify;">Bottom line, feel free to use the updated online version of the free SMS extractor:</p>
<p style="text-align: center;">Click: <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hhcmFsZGtyYWZ0LmRlL3Ntcy1leHRyYWN0b3Iv" title=\"SMS / text message extraction from iPhone\">SMS / text message extraction from iPhone</a></p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=390" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/11/correct-csv-export-for-free-iphone-sms-extractor/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8220;sudo&#8221; in OpenSolaris</title>
		<link>http://blog.haraldkraft.de/2011/11/sudo-in-opensolaris/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sudo-in-opensolaris</link>
		<comments>http://blog.haraldkraft.de/2011/11/sudo-in-opensolaris/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 16:22:53 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[sudo]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=377</guid>
		<description><![CDATA[One of the objectives of this blog &#8211; when I started it &#8211; was to archive solutions to problems which took me a while to find. If at the time a Google search with the most common question to the problem didn&#8217;t show a page with a solution within the first results, I created a [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">One of the objectives of this blog &#8211; when I started it &#8211; was to archive solutions to problems which took me a while to find. If at the time a Google search with the most common question to the problem didn&#8217;t show a page with a solution within the first results, I created a blog post in order for it to be easier accessible for myself &#8211; along with sharing that solution with the open web. Furthermore, it&#8217;s a technique to remember things easier: <em>write them down once and you won&#8217;t forget</em>.</p>
<p><span id="more-377"></span></p>
<p style="text-align: justify;">In the beginning I was fooling around with a <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAwOS8wNi9xdWFkcnVwbGUtYm9vdC8=" title=\"Quadruple boot\">quad-boot system</a> including OpenSolaris.<br />
Unfortunately I haven&#8217;t been using OpenSolaris that much, so I kept forgetting what the equivalent to the Unix command <em>sudo</em> was. However I still remember that whenever I did use OpenSolaris, somehow it took me a while to find the answer &#8211; this might seem strange because when googling for &#8220;sudo in opensolaris&#8221; at this point in time, you will get the correct answer right away.</p>
<p style="text-align: justify;">Nevertheless I thought this might be worth a tiny blog post and personal reminder that the OpenSolaris equivalent to Unix&#8217;s sudo is <em>pfexec</em>:</p<br />
<code>pfexec &lt;command&gt;</code></p>
<p style="text-align: justify;">or if I may quote <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2RldmVsb3BlcnMuc3VuLmNvbS9kZXZlbG9wZXIvdGVjaG5pY2FsQXJ0aWNsZXMvb3BlbnNvbGFyaXMvcGZleGVjLmh0bWw=" title=\"pfexec\">Sun/Oracle</a>: <em>"In effect, pfexec functions as a passwordless su or sudo in Linux."</em></p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=377" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/11/sudo-in-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>btrfs</title>
		<link>http://blog.haraldkraft.de/2011/10/btrfs/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=btrfs</link>
		<comments>http://blog.haraldkraft.de/2011/10/btrfs/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 18:15:08 +0000</pubDate>
		<dc:creator>Markus Mauder</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[btrfs]]></category>
		<category><![CDATA[file system]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=366</guid>
		<description><![CDATA[Is it possible to get excited about a technology we never notice when using a computer? File systems do their job and we never give them a second thought. On a fresh setup of Ubuntu 11.10 I have 10 different mkfs.* binaries, allowing the creation of as many file systems. Why is there more than [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Is it possible to get excited about a technology we never notice when using a computer? File systems do their job and we never give them a second thought. On a fresh setup of Ubuntu 11.10 I have 10 different mkfs.* binaries, allowing the creation of as many file systems. Why is there more than one? Let&#8217;s take a look at one I find truly exciting: <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2J0cmZzLndpa2kua2VybmVsLm9yZy8=">btrfs</a>, the newest entry in the Linux file system zoo.</p>
<h3>What is it?</h3>
<p style="text-align: justify;">Btrfs is a file system designed to handle large amounts of data. It is capable of organizing volumes of up to 16 EiB and supports a maximum file size of 16 EiB. To ensure a consistent file system state, it uses copy-on-write, meaning it writes data to new locations and then updates the entry in the file system trees, so the changes only become visible once they have been completed. As a comparison: ext4 (which is the newest update of the ext-family of file systems traditionally used on Linux) supports 1 EiB volumes (1/16) and 16 TiB file sizes (1/2^20). And ext4 is a journaling file system. It records changes to be made before making them so the system state can be restored in the event of a crash.</p>
<p><span id="more-366"></span></p>
<p style="text-align: justify;">btrfs also has a few interesting new features, which we will take a look at in a minute after having a look at how the development of btrfs started.</p>
<p style="text-align: justify;">In 2004, Sun made waves with their ZFS file system for Solaris. It provided many new capabilities, which were not available in production-grade file systems at the time. Examples include 16EB maximum file size, copy-on-write and data dedublication. It was opensourced as part of OpenSolaris and eventually <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3pmc29ubGludXgub3JnLw==">ported to linux</a>, although never included due to license incompatibilities. Probably in response, <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9sa21sLm9yZy9sa21sLzIwMDcvNi8xMi8yNDI=">Oracle&#8217;s Chris Mason announced btrfs</a>, its own new copy-on-write file system capable of storing 16 EiB files and supporting similar features like snapshots in 2007. Ironically, <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5vcmFjbGUuY29tL3VzL3N1bi9pbmRleC5odG0=">Oracle acquired Sun</a> in 2010.<br />
By now this new file system is bundled in all major Linux distributions (since <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5kZWJpYW4ub3JnL05ld3MvMjAxMS8yMDExMDIwNWEuZW4uaHRtbA==">Debian 6.0</a>, <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly93aWtpLnVidW50dS5jb20vTWF2ZXJpY2tNZWVya2F0L1JlbGVhc2VOb3Rlcw==">Ubuntu 10.10</a> and <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2RvY3MuZmVkb3JhcHJvamVjdC5vcmcvZW4tVVMvRmVkb3JhLzEzL2h0bWwvUmVsZWFzZV9Ob3Rlcy8=">Fedora 13</a> (this was the earliest mention I found, maybe even earlier). Fedora plans to eventually <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2x3bi5uZXQvQXJ0aWNsZXMvNDU0MzQ3Lw==">use btrfs as their default file system</a>.</p>
<h3>New features</h3>
<p style="text-align: justify;">The <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cHM6Ly9sa21sLm9yZy9sa21sLzIwMDcvNi8xMi8yNDI=">original announcement</a> listed 12 features as implemented or to do. Let me highlight some of the more exciting ones:</p>
<ul>
<li>snapshots</li>
<p style="text-align: justify;">Since btrfs is a copy-on-write file system, it can keep trees representing the state at an earlier time around without any additional copying. This feature can be used to implement proper &#8220;safe points&#8221; to restore a system in case something goes wrong. No more booting of life systems and manual restoring of backups!</p>
<li>storage mode for SSDs</li>
<p style="text-align: justify;">New computers often come with solid state disks, which are faster to read and write, allow random access, but have a smaller number of write cycles. These properties can be used and taken into account by choosing a different strategy for identifying disk space to allocate on write. <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waG9yb25peC5jb20vc2Nhbi5waHA/cGFnZT1hcnRpY2xlJmFtcDtpdGVtPWJ0cmZzX3NzZF9tb2RlJmFtcDtudW09MQ==">Phoronix has compared the write speed of SSD drives</a> using btrfs in both the normal and SSD mode.</p>
<li>file system based RAID</li>
<p style="text-align: justify;">Or rather RAID-like features. Specifically, btrfs currently supports distributing file systems over more than one physical disk (like RAID0) and duplication (like RAID1).</p>
<li>subvolumes</li>
<p style="text-align: justify;">Similar to snapshots, subvolumes allow the same data store to be used for several file systems. In essence, the same file system can have more than one root directory in the same disk space.</p>
</ul>
<p style="text-align: justify;">I for one am very excited about snapshots, but can imagine all of those features to come in handy in the future. Check out the <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VuLndpa2lwZWRpYS5vcmcvd2lraS9CdHJmcw==">btrfs wikipedia article</a>, which lists those features with links to helpful articles inside its enormous repository of knowledge.</p>
<h3>Status</h3>
<p style="text-align: justify;">btrfs is still not considered stable and there are some very exciting features forthcoming. One notable omission is that of a file system check utility. btrfs-fsck can currently detect errors in the file system, but not fix them yet. After some delays, this functionality is supposed to be <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2FydGljbGUuZ21hbmUub3JnL2dtYW5lLmNvbXAuZmlsZS1zeXN0ZW1zLmJ0cmZzLzEzNDE4">released real soon now</a>. Oracle plans to use btrfs as their default file system in Oracle Linux, which makes this tool a necessity.</p>
<p style="text-align: justify;">I have used btrfs on the storage partition of my laptop since the release of Ubuntu 11.10 and have not had any issues. (However, making the boot partition btrfs failed with boot issues. Not unresolvable, but not a priority of mine at the time.) Additionally, I have upgraded the default ext4 root partition on a fresh Fedora 16 beta release to btrfs using the btrfs-convert tool from btrfs-progs. (Doing it this way is quite risk-free. The tool will keep your ext-data around so you can restore your previous state. As usual, backups are a good idea when playing with new stuff. Don&#8217;t forget to update the affected partitions&#8217; UUIDs (use blkid to determine the current value), which will be changed by the conversion. /etc/fstab and the boot loader come to mind.)</p>
<h3>Summary</h3>
<p style="text-align: justify;">btrfs is a new Linux file system. It has many exciting new features and is already stable enough to be used on non-critical systems. When the integration with tools on Linux-based systems improves we will see some exciting new capabilities coming to these systems. Currently, <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2ZlZG9yYXByb2plY3Qub3JnL3dpa2kvRmVhdHVyZXMvU3lzdGVtUm9sbGJhY2tXaXRoQnRyZnM=">Fedora integrates snapshots into GRUB</a> to realize proper system rollbacks. Expect this and more features to get picked up by the other distributions.</p>
<p style="text-align: justify;">We are not going to notice much of it in normal operation, but we can rest easy in the knowledge that btrfs manages our exbibytes for us.</p>
<p><i>Guest post by <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL21hdWRlci5uYW1l">Markus Mauder</a>.</i></p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=366" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/10/btrfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Access denied for existing MySQL user</title>
		<link>http://blog.haraldkraft.de/2011/07/access-denied-for-existing-mysql-user/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=access-denied-for-existing-mysql-user</link>
		<comments>http://blog.haraldkraft.de/2011/07/access-denied-for-existing-mysql-user/#comments</comments>
		<pubDate>Tue, 19 Jul 2011 20:19:31 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[access denied]]></category>
		<category><![CDATA[grant tables]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[privileges]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=164</guid>
		<description><![CDATA[After I was fed up with using the administrative MySQL account on my local machine even though I had a personal account, I finally got to the bottom of why I was denied access to that user no matter how often I deleted, re-created the account and flushed privileges. The problem occurs when you try [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">After I was fed up with using the administrative MySQL account on my local machine even though I had a personal account, I finally got to the bottom of why I was denied access to that user no matter how often I deleted, re-created the account and flushed privileges.</p>
<p><span id="more-164"></span></p>
<p style="text-align: justify;">The problem occurs when you try to login and looks as if you entered the wrong password:</p>
<p><code>ERROR 1045 (28000): Access denied for user 'username'@'localhost' (using password: YES)</code></p>
<p>If you&#8217;re using phpMyAdmin, it looks like this:</p>
<p><code>#1045 Cannot log in to the MySQL server</code></p>
<p style="text-align: justify;">However, I knew that I had granted privileges to that user with the wildcard host % so I could connect locally and also from anywhere else. Showing grants as root user:</p>
<p><code>mysql&gt; show grants for 'username'@'%';<br />
+---------------------------------------------+<br />
| Grants for username@%          |<br />
+---------------------------------------------+<br />
| GRANT ALL PRIVILEGES ON *.* TO 'username'@'%' IDENTIFIED BY PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19' WITH GRANT OPTION |<br />
+---------------------------------------------+<br />
1 row in set (0.00 sec)</code></p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">The root of this problem lies only in part with the custom user <em>username</em>. The actual problem is, that commonly upon setup of the MySQL server a few users are generated automatically, including the anonymous-user account (with privileges for wildcard host % as well as localhost). When you try to connect locally (which happens if you use command line or phpMyAdmin) with your custom user <em>username</em>, there are no privileges for such user connecting from localhost and therefore the connection is treated as an anonymous user (because such privileges do exist).<br />
So in order to be able to use your custom user also when connecting from localhost, you need to create the same user (can be a different password, though) with the host <em>localhost</em> and grant the desired privileges:</p>
<p><code>CREATE USER 'username'@'localhost' IDENTIFIED BY 'your_password';<br />
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost' WITH GRANT OPTION;</code></p>
<p style="text-align: justify;">&nbsp;</p>
<p style="text-align: justify;">Please see the MySQL Reference Manual section <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Rldi5teXNxbC5jb20vZG9jL3JlZm1hbi81LjYvZW4vYWRkaW5nLXVzZXJzLmh0bWw=">5.5.2 Adding User Accounts</a> about these reasons.<br />
The issue was solved with the help of LinuxQuestions.org in <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5saW51eHF1ZXN0aW9ucy5vcmcvcXVlc3Rpb25zL3Nob3d0aHJlYWQucGhwP3Q9ODc0NzI5">this thread</a>.</p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=164" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/07/access-denied-for-existing-mysql-user/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Free SMS Extractor for iPhone (written in PHP) &#8211; online version</title>
		<link>http://blog.haraldkraft.de/2011/06/sms-extractor-for-iphone-written-in-php-online-version/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sms-extractor-for-iphone-written-in-php-online-version</link>
		<comments>http://blog.haraldkraft.de/2011/06/sms-extractor-for-iphone-written-in-php-online-version/#comments</comments>
		<pubDate>Fri, 10 Jun 2011 21:32:18 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Life and People]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text messages]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=228</guid>
		<description><![CDATA[A few weeks ago I created a small PHP script that could extract text messages from an iPhone SQLite storage file. It required the user to have a PHP interpreter ready in order to run the script, which might be an obstacle keeping him or her from using the script. Because I&#8217;m currently having more [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAv">A few weeks ago I created a small PHP script</a> that could extract text messages from an iPhone SQLite storage file. It required the user to have a PHP interpreter ready in order to run the script, which might be an obstacle keeping him or her from using the script.</p>
<p style="text-align: justify;">Because I&#8217;m currently having more fun to do some programming in PHP than to rewrite the original script in Java (most people will have a JVM and/or JRE installed), I created a new webpage that uses the original script.</p>
<p><span id="more-228"></span></p>
<p style="text-align: center;">Click: <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2hhcmFsZGtyYWZ0LmRlL3Ntcy1leHRyYWN0b3Iv">SMS / text message extraction from iPhone</a></p>
<p style="text-align: justify;">The usage is simple: select the SQLite database file, make customizations if desired (otherwise default values will be used) and click &#8220;Extract&#8221;. You might have to wait a little while depending on the size of your storage file. After the file has been (automatically) uploaded and messages have been extracted, you will be offered a download prompt for the result file.<br />
See the above page for further details.</p>
<p style="text-align: justify;">Compared to other online solutions out there, this version (as well as the <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAvZXh0cmFjdF9zbXMtcGhwLw==">original script</a>) has more ways of tailoring the output to your own needs and the usage is utterly free. However, so far you cannot yet change the arrangement of phone number, date and message in the new online version; if you want to do that, you will still have to use the <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAv">original work</a> (which was released under <em>CC BY 3.0</em>).</p>
<p style="text-align: justify;">Please leave comments about the usage into this blog post, so I can improve the page and script if necessary.</p>
<p>Cheers</p>
<p style="text-align: justify;"><strong>UPDATE (21/11/2011):</strong> <em><a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8xMS9jb3JyZWN0LWNzdi1leHBvcnQtZm9yLWZyZWUtaXBob25lLXNtcy1leHRyYWN0b3Iv" title=\"Correct CSV export for free iPhone SMS extractor\">Correct CSV export</a> was added.</em></p>
<p style="text-align: justify;"><strong>UPDATE (05/01/2012):</strong> <em>Now supports iOS 5 container.</em></p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=228" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/06/sms-extractor-for-iphone-written-in-php-online-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SMS Extractor for iPhone (written in PHP)</title>
		<link>http://blog.haraldkraft.de/2011/05/sms-extractor-for-iphone-written-in-php/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sms-extractor-for-iphone-written-in-php</link>
		<comments>http://blog.haraldkraft.de/2011/05/sms-extractor-for-iphone-written-in-php/#comments</comments>
		<pubDate>Wed, 11 May 2011 17:51:48 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[Life and People]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[itunes]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text messages]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=150</guid>
		<description><![CDATA[UPDATE (10/06/2011): I started an online version of the script, see new blog post. For a while I&#8217;ve been checking out various programs for extracting and converting text messages from the iPhone SMS storage SQLite database. For some reason they seem to be either for purchase or not doing their job well. When I found [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><strong>UPDATE (10/06/2011):</strong> <em>I started an online version of the script, see <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNi9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAtb25saW5lLXZlcnNpb24v">new blog post</a>.</em></p>
<p style="text-align: justify;">For a while I&#8217;ve been checking out various programs for extracting and converting text messages from the iPhone SMS storage SQLite database. For some reason they seem to be either for purchase or not doing their job well.<br />
When I found out that all they are doing is pretty much just some simple SQL query and putting the result into various output formats, I decided to quickly write this myself, while keeping it simple and open.</p>
<p><span id="more-150"></span></p>
<p style="text-align: center;"><a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAvZXh0cmFjdF9zbXMtcGhwLw==" rel='attachment wp-att-175'>Download</a></p>
<p style="text-align: justify;">The choice of a programming language wasn&#8217;t easy taking into account that most iPhone users will be on Windows and the extractor should not require major alterations to the system (and doing that without the solution itself being bloated).<br />
Even though the task can be easily done in various languages such as Perl, Python, PHP, C/C++ or Java, I decided to use PHP, because the program can stay very simple and can run with a minimal version of PHP. In addition many users with a Unix/Linux machine available will have PHP installed anyway and can also easily use the program.<br />
That being said we can move on to the program details. The PHP script needs the iPhone SMS storage SQLite database file as input and will then convert all text messages and append them to a file in a certain format.<br />
So far the script is configurable to a certain extent. Naturally the name of the input and output file can be modified. Furthermore you can decide whether you want to extract just incoming or outgoing texts or all of them. Last but not least a date range can be given, from which to extract the messages. See further down (or code) for details about customization.<br />
At this point in time, it is not (yet) possible to limit extraction to a single contact. Even though it might be a common use case for many users, however the format of recipient/sender may vary (at least in my storage file), so it might be hard to determine which number formats are from the same contact.</p>
<p>The usage of the extractor is as follows:</p>
<ol>
<li>First you will need the SMS storage container file (it is usually named <em>3d0d7e5fb2ce288813306e4d4636395e047a3d28</em> and can be found in the iTunes backup folder, which can be found e.g. on Windows7 in <em>C:\Users\[username]\AppData\Roaming\Apple Computer\MobileSync\Backup\[hexstring]</em> or get it directly from your iPhone: <em>/var/mobile/Library/SMS/sms.db</em> )</li>
<li>If you&#8217;re on Unix/Linux, make sure you have PHP5 (along with libs for sqlite) installed. If you&#8217;re on Windows, you can either use the <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpbmRvd3MucGhwLm5ldC9kb3dubG9hZHMvcmVsZWFzZXMvcGhwLTUuMi4xNy1XaW4zMi1WQzYteDg2Lm1zaQ==">official PHP installer</a> [alternative: <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3dpbmRvd3MucGhwLm5ldC9kb3dubG9hZC8=">http://windows.php.net/download/</a>] (just run the installer) or use my <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAvcGhwNS0yLW1pbmltYWwv" rel='attachment wp-att-179'>minimized packaged version of PHP</a> (just unpack to a location of your desire)</li>
<li>Download the <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2Jsb2cuaGFyYWxka3JhZnQuZGUvMjAxMS8wNS9zbXMtZXh0cmFjdG9yLWZvci1pcGhvbmUtd3JpdHRlbi1pbi1waHAvZXh0cmFjdF9zbXMtcGhwLw==" rel='attachment wp-att-175'>SMS Extractor for iPhone (extract_sms.php_.txt)</a>, rename it to <em>extract_sms.php</em> and use a text editor of your desire to make configuration changes (see below and/or follow the instructions and explanations in the code)</li>
<li>If you used the PHP installer, navigate to the folder containing extract_sms.php and double-click on it (make sure you placed the SMS storage container file in the same directory and modified the input configuration)</li>
<li>If you used my minimized version, place extract_sms.php in the same folder you unpacked the PHP archive; use Start, Run&#8230;, &#8220;cmd.exe&#8221; and navigate to the correct folder / if you&#8217;re on Unix/Linux, navigate to the folder you downloaded extract_sms.php)</li>
<li>(make sure you placed the SMS storage container file in the same directory and modified the input configuration) then run the script typing &#8220;php extract_sms.php&#8221;</li>
<li>Unless you changed the output file, you will find a file &#8220;sms.txt&#8221; in the same folder</li>
</ol>
<p style="text-align: justify;">Possible customization can be done in the following ways (look for &#8220;<em>user specific CONFIGURATION</em>&#8221; in extract_sms.php ):</p>
<ul>
<li><strong>$DATABASE = &#8220;sms.db&#8221;</strong><br />
change this to the appropriate filename if your SMS storage container file is named differently</li>
<li><strong>$TIME_FORMAT = &#8220;d.m.Y H:i:s&#8221;</strong><br />
the internal text message timestamp is the number of seconds since Unix Epoch, so in order to make this human readable, provide the time format of your desire (see http://www.php.net/manual/en/function.date.php for details)</li>
<li><strong>$FILTER = &#8220;ALL&#8221;</strong><br />
set here whether you would like to limit extraction to only incoming text messages (&#8220;<em>IN</em>&#8220;), or only outgoing messages (&#8220;<em>OUT</em>&#8220;) or no limit (&#8220;<em>ALL</em>&#8220;)</li>
<li><strong>$OUTFILE = &#8220;./sms.txt&#8221;</strong><br />
name for the output file, you can change this to any name with or without file extension</li>
<li><strong>date_default_timezone_set(&#8216;Europe/Berlin&#8217;)</strong><br />
if you want to use a time range (see next item), you need to specify your timezone (which supposedly equals the timezone your text messages got timestamped). See <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3d3dy5waHAubmV0L21hbnVhbC9lbi90aW1lem9uZXMucGhw">http://www.php.net/manual/en/timezones.php</a> for available timezones</li>
<li><strong>$RANGE_BEGIN = mktime( 22, 45, 00, 11, 9, 2009 )</strong> and/or <strong>$RANGE_END = mktime( 22, 55, 00, 11, 9, 2009 )</strong><br />
if you want to use a time range, you can configure either a start or an end of range or even both. The order of comma separated digits in parentheses is: <em>hour, min, sec, mon, day, year</em>. Also, you need to uncomment (i.e. remove the leading <strong>//</strong>) the line of the variable(s) you want to use</li>
<li>Replace file instead of appending ( <strong>$f_handle = fopen( $OUTFILE, &#8220;a&#8221; );</strong> )<br />
the default behavior is to open the output file in append mode in order to avoid accidental overwrite. If you would like replace the output file instead of appending the extracted text messages, put &#8220;<em>w</em>&#8221; instead of &#8220;<em>a</em>&#8220;</li>
<li>Change output format ( <strong>fwrite( $f_handle, &#8220;$time$senderror\n$address\n$text\n\n\n&#8221; );</strong> )<br />
if you would like to change the format in which the script is putting your extracted text message information, you will need to change this line appropriately. However, I cannot provide a manual how to change it to your liking at this moment; you will either know what you&#8217;re doing or have to google and trial &#8216;n error <img src='http://blog.haraldkraft.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
</ul>
<p style="text-align: justify;">Please feel free to comment about the usage or drop me an email at <span id="emob-oybt@unenyqxensg.qr-55">blog {at} haraldkraft(.)de</span><script type="text/javascript">
    var mailNode = document.getElementById('emob-oybt@unenyqxensg.qr-55');
    var linkNode = document.createElement('a');
    linkNode.setAttribute('href', "mailto:%62%6C%6F%67%40%68%61%72%61%6C%64%6B%72%61%66%74%2E%64%65");
    tNode = document.createTextNode("blog {at} haraldkraft(.)de");
    linkNode.appendChild(tNode);
    linkNode.setAttribute('id', "emob-oybt@unenyqxensg.qr-55");
    mailNode.parentNode.replaceChild(linkNode, mailNode);
</script>. It&#8217;s fine with me to continue development and add new (simple) features, and definitely fix bugs I might have there in PHP; just let me know <img src='http://blog.haraldkraft.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p style="text-align: center;">Also, please do use my script for your adaptions; I am releasing this under CC.<br />
<a rel=\"license\" href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnkvMy4wLw=="><img style="border-width: 0;" src="http://i.creativecommons.org/l/by/3.0/88x31.png" alt="Creative Commons License" /></a><br />
This work is licensed under a <a rel=\"license\" href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbGljZW5zZXMvYnkvMy4wLw==">Creative Commons Attribution 3.0 Unported License</a>.</p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=150" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2011/05/sms-extractor-for-iphone-written-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable / Disable EDGE on iPhone without jailbreak and toggles</title>
		<link>http://blog.haraldkraft.de/2010/07/enable-disable-edge-on-iphone-without-jailbreak-and-toggles/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=enable-disable-edge-on-iphone-without-jailbreak-and-toggles</link>
		<comments>http://blog.haraldkraft.de/2010/07/enable-disable-edge-on-iphone-without-jailbreak-and-toggles/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 22:21:06 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[edge]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[jailbreak]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=138</guid>
		<description><![CDATA[After a long history of incidents/accidents, I&#8217;ve been using my iPhone 3GS (new bootrom) with regular iOS4 for a couple of days. However, I had to do without any mobile internet &#8211; even though my contract was fine and it had been working just fine with 3.1.2. I&#8217;ve pretty much tried every instruction that&#8217;s out [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">After a long history of incidents/accidents, I&#8217;ve been using my iPhone 3GS (new bootrom) with regular iOS4 for a couple of days. However, I had to do without any mobile internet &#8211; even though my contract was fine and it had been working just fine with 3.1.2.</p>
<p style="text-align: justify;">I&#8217;ve pretty much tried every instruction that&#8217;s out there which has anything to do with enabling mobile internet. Removing SIM-card, resetting APN (even though my provider doesn&#8217;t even need any APN settings), completely resetting network settings &#8211; along with disabling+enabling mobile data connections and/+ 3G for a thousand times. The &#8220;E&#8221; or the &#8220;3G&#8221; was showing up fine (depending which one I enabled), nevertheless, no connection could be made from any app.</p>
<p style="text-align: justify;"><span id="more-138"></span><br />
Then I remembered something from previous days: I was using SBsettings along with toggles (one for EDGE, one for 3G), and I usually enabled or disabled both of them at the same time. Enabled them when I needed mobile internet, disabled them in order to save battery. So, depending on whether 3G was available, the bar was showing &#8220;3G&#8221; or just &#8220;E&#8221; &#8211; however, it was also still showing &#8220;E&#8221; even when I disabled both 3G and EDGE via toggles. I.e., an &#8220;E&#8221; was showing, but there was no connection &#8211; any app would confirm no connection. Furthermore, if I had EDGE disabled via toggle, I could enable 3G &#8211; and get a shiny &#8220;3G&#8221; &#8211; but still no connection possible.</p>
<p style="text-align: justify;">So, the fact that if &#8211; in the current state with iOS4 &#8211; I disabled mobile data connections and there showing <strong>no</strong> &#8220;E&#8221; at all, made me presume that in earlier days my &#8220;mobile data connections&#8221; was always enabled and I was just switching EDGE and/+ 3G on and off. This could also mean &#8211; with remembrance of the &#8220;E&#8221; always showing in earlier days &#8211; that when I enabled mobile data connection now, I could enable 3G all I wanted, there would be no connection if EDGE was disabled (which I couldn&#8217;t enable, since I&#8217;m on iOS4 without toggles).</p>
<p style="text-align: justify;">On order to prove or test this, I had to find a way to enable EDGE without the availability of a jailbreak and therefore with a lack of toggles. My dear friend <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL2VpbnNlbGYuY29t">Andre</a> (special thx again) had a diff run on his iTunes MobileSync backup &#8211; once with EDGE enabled and once with EDGE disabled via toggle. He came to the following result:</p>
<p>In the backup file <em>d67ab43d1c47dd60d7cf3a7a3939775f6938a8ef.mddata</em> (3.x) or <em>8218978e4ab0a48035bb92653145a6be872ea858</em> (4.0) you will find the following excerpt (note the &#8220;ip<strong>1</strong>&#8220;):</p>
<p><code>&lt;string&gt;com.apple.CommCenter (ip1)&lt;/string&gt;<br />
&lt;key&gt;com.apple.CommCenter&lt;/key&gt;<br />
&lt;dict&gt;<br />
&lt;key&gt;AllowNetworkAccess&lt;/key&gt;<br />
&lt;integer&gt;1&lt;/integer&gt;<br />
&lt;key&gt;Available&lt;/key&gt;<br />
&lt;integer&gt;1&lt;/integer&gt;</code></p>
<p style="text-align: justify;">The integer following the <em>Available</em>-node switches between 1 (EDGE toggle on) and 0 (EDGE toggle off). That basically meant, that for enabling EDGE without a toggle, I had to alter this value and get it back into my iPhone.</p>
<p>Simple way to do it:</p>
<ol>
<li>Backup/Sync iPhone</li>
<li>Restore iPhone</li>
<li>manually edit the above file (depending on your OS version) in the current backup folder</li>
<li>Recover iPhone with the backup you created and edited</li>
</ol>
<p style="text-align: justify;">That&#8217;s it &#8211; it worked for me. EDGE seems to be enabled, and I can use the OS switches for data connection and 3G as I like, they work, as well, as expected+desired.</p>
<p>Hope this helps.</p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=138" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2010/07/enable-disable-edge-on-iphone-without-jailbreak-and-toggles/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Opera and innerHTML vs. createTextNode()</title>
		<link>http://blog.haraldkraft.de/2010/01/opera-and-innerhtml-vs-createtextnode/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=opera-and-innerhtml-vs-createtextnode</link>
		<comments>http://blog.haraldkraft.de/2010/01/opera-and-innerhtml-vs-createtextnode/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 00:18:26 +0000</pubDate>
		<dc:creator>Harald Kraft</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://blog.haraldkraft.de/?p=102</guid>
		<description><![CDATA[Recently I came across the situation where I created a webpage on which I wanted to include some raw XML data in a &#60;textarea&#62; so the user could see that XML data including all tags and stuff. What made the setup special was, that in this scenario I didn&#8217;t just put a predefined XML formatted [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Recently I came across the situation where I created a webpage on which I wanted to include some raw XML data in a &lt;textarea&gt; so the user could see that XML data including all tags and stuff. What made the setup special was, that in this scenario I didn&#8217;t just put a predefined XML formatted data inside the textarea, but the XML data was supposed to be inserted into the webpage (into the textarea) on the client-side via Javascript.<br />
(In order to give you a little bit more information about the whole picture: the source XML data &#8211; to be inserted on the fly &#8211; might change and should be able to be updated without reloading the whole page)</p>
<p><span id="more-102"></span></p>
<p style="text-align: justify;">I thought easy peasy, I&#8217;ll just get the textarea element by its ID and set its innerHTML to the desired XML data:</p>
<p><code>xmltext = loadXMLText( xmldoc );<br />
document.getElementById(targetid).innerHTML = xmltext;<br />
</code></p>
<p style="text-align: justify;">This did work in IE 7 as well as in FF 3.5, but Opera (10.10 at the time) displayed a strange behavior. It rendered to content of appearing nodes (from the XML data) but replaced the node tags with spaces:</p>
<p><code>&lt;object&gt;&lt;name&gt;Foobar&lt;/name&gt;<br />
&lt;/object&gt;<br />
</code></p>
<p style="text-align: justify;">would be rendered as (mask to see spaces):</p>
<p><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Foobar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
</code></p>
<p style="text-align: justify;">It took me a while (despite the use of Dragonfly, Opera&#8217;s debug tool) to figure out that the problem was not the &lt;textarea&gt;. Throughout my history with Opera and other browsers I gathered that if a website is viewed &#8220;incorrectly&#8221; in Opera, it usually meant that there was something wrong with the code.<br />
I then switched to the method of adding a new node to the DOM tree, which included the text from the XML data I wanted to be inserted:</p>
<p><code>xmltext = loadXMLText( xmldoc );<br />
textnode = document.createTextNode( xmltext );<br />
document.getElementById(targetid).appendChild( textnode );<br />
</code></p>
<p style="text-align: justify;">This now worked just fine in Opera. And so I assumed that creating a new DOM node via createTextNode() was the correct method if you wanted to insert any form of text (whether it&#8217;s source code shown as raw text or just text).</p>
<p style="text-align: justify;">Since then I&#8217;ve googled and read a few things about innerHTML, createTextNode() and Opera. It seems that throughout its versions Opera went from supporting innerHTML (the same way other browsers did) to not supporting and to supporting again and so on.<br />
I am usually the kind of guy who thinks &#8220;if this code is wrong, show me so I can see it&#8217;s wrong, don&#8217;t try to guess what I meant&#8221; &#8211; even though guessing what web developers meant seems to be the specialty of most browsers. But in this case we can&#8217;t really say that using innerHTML is &#8220;wrong&#8221; even though it&#8217;s not the best thing to do. One of its advantages might be speed (especially if you&#8217;d have to create a lot of new nodes), but on the other hand it&#8217;s not a standard, so we can&#8217;t blame browsers if they don&#8217;t display it the way we want it to.</p>
<p style="text-align: justify;">So as a final note, I&#8217;d like to say that I hope people having trouble with innerHTML and Opera find this blog post so they can fix their problem.<br />
And for those open to discussion about whether it&#8217;s bad/wrong/good/whatsoever to use innerHTML, I recommend <a href="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?url=aHR0cDovL3NsYXllcm9mZmljZS5jb20vYXJ0aWNsZXMvaW5uZXJIVE1MX2FsdGVybmF0aXZlcy8=">this article</a> which offers a nice list of ups and downs of innerHTML along with a whole bunch of scenarios and alternate ways to reach your goal without using a non-standard method <img src='http://blog.haraldkraft.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>
 <img src="http://blog.haraldkraft.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=102" width="1" height="1" style="display: none;" />]]></content:encoded>
			<wfw:commentRss>http://blog.haraldkraft.de/2010/01/opera-and-innerhtml-vs-createtextnode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

