<?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>Ronald! &#187; Computing</title>
	<atom:link href="http://www.rchu.nl/cat/computing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rchu.nl</link>
	<description>My own little corner of the world wide web</description>
	<lastBuildDate>Mon, 12 Jul 2010 23:44:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>My First Steam experience</title>
		<link>http://www.rchu.nl/2010/05/my-first-steam-experience/</link>
		<comments>http://www.rchu.nl/2010/05/my-first-steam-experience/#comments</comments>
		<pubDate>Fri, 14 May 2010 11:09:43 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=555</guid>
		<description><![CDATA[As a Mac user Steam used to be something from another planet, until recently. I am happy Steam comes to the Mac, bringing lots of great games for me to play. The news that Portal is free (for a limited time) was the trigger for me to actually get started with Steam. And my joy [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-05-14-at-12.53.27.png"><img class="alignright size-medium wp-image-556" title="Steam (Mac Screen shot) " src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-05-14-at-12.53.27-300x201.png" alt="Steam (Mac Screen shot) " width="300" height="201" /></a>As a Mac user <a href="http://en.wikipedia.org/wiki/Steam_%28content_delivery%29">Steam</a> used to be something from <a href="http://www.microsoft.com/windows/">another planet</a>, until recently. I am happy Steam comes to the Mac, bringing lots of great games for me to play. The news that <a href="http://store.steampowered.com/freeportal">Portal is free</a> (for a limited time) was the trigger for me to actually get started with Steam. And my joy went away fast.</p>
<p><span id="more-555"></span>First of all, I don&#8217;t like the fact that if I actually want to play Portal I have to:</p>
<ol>
<li>Download Steam (a few Mb).</li>
<li>Download the actual Steam files within Steam.</li>
<li>Download several Steam updates.</li>
<li>Download Portal.</li>
<li>Ignore a warning about the minimum system specifications and my windows video driver having an unknown version. Now that says something about the native OS X version they build…</li>
<li>Wait, because even tough the download isn&#8217;t complete and won&#8217;t resume there is a &#8220;play&#8221; button which cannot start the game because their servers are too busy.</li>
<li>Whatever the future may bring…</li>
</ol>
<p>Second, I have less trust in a native application that doesn&#8217;t feel native (misaligned button labels; buttons, and worse, hyperlinks with no feedback weather I clicked them; custom colors, themes and icons; windows sometimes not showing up after switching applications; a crash when I press <code>Command+Q</code>), especially when it doesn&#8217;t work smoothly the first time I use it. Little inconsistencies like one window telling me it went wrong and the other it went fine does not help in gaining my trust either.</p>
<p>But, since I know I like Portal and because I&#8217;d like to be able to play more games on my Mac I&#8217;m just going to keep on trying. It is a good move to make an extremely popular game free to boost the number of Mac Steam users, because it makes users like me accept the rough patches and keep on trying.</p>
<p><strong><em>Update:</em></strong><em> After deleting all local files and downloading Portal again everything went fine, except that the warning about minimum system requirements turned out to be meaningful: Portal does not work on my MacBook (2.16 GHz</em> <em>Core 2 Duo).</em></p>
<p><em> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/05/my-first-steam-experience/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Human vs Machine clustering in Music collections</title>
		<link>http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/</link>
		<comments>http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 12:50:47 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[study]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=537</guid>
		<description><![CDATA[For the semantic web course in my master program I&#8217;ve spend the last few weeks working on an exploratory project with two colleagues. The goal we&#8217;ve set for ourselves is to research if it is at all possible to cluster music based on automatically extracted musical features and compare those clusterings to clusterings based on [...]]]></description>
			<content:encoded><![CDATA[<p>For the semantic web course in my master program I&#8217;ve spend the last few weeks working on an exploratory project with two colleagues. The goal we&#8217;ve set for ourselves is to research if it is at all possible to cluster music based on automatically extracted <a href="http://en.wikipedia.org/wiki/Music_information_retrieval">musical features </a>and compare those clusterings to clusterings based on the tags users annotated the songs with on <a href="http://www.last.fm/">Last.fm</a>.</p>
<p><span id="more-537"></span>Even though time was very limited and many improvements can be made in almost every step the results we obtained are encouraging. The clustering based on the musical features did make (some) sense and the differences between human categorisation and feature based clustering are interesting to say the least. The most striking example to me is that there always was a cluster with (almost) all classical music and <a href="http://www.last.fm/music/Nirvana/_/Something+in+the+Way">a song by Nirvana</a>, which users put in the grunge genre.</p>
<p>It was fun to work on, and I hope there are possibilities to continue this project with more time to make more proper assessments. And as a personal bonus I finally got around to exploring the beautiful programming language Python. Of course I&#8217;ve only scratched the surface, but it was enough to make my programmers heart beat a bit faster.</p>
<p><em>You can read t<a href="http://www.rchu.nl/files/HumanVsMachineClusteringMusic.pdf">he full paper </a>and if you want, for some reason, get <a href="http://www.rchu.nl/files/HumanVsMachineClusteringMusic.tar.bz2">the raw results and source code</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/04/human-vs-machine-clustering-in-music-collections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some nice layout changes</title>
		<link>http://www.rchu.nl/2010/04/some-nice-layout-changes/</link>
		<comments>http://www.rchu.nl/2010/04/some-nice-layout-changes/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 18:27:36 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[applescript]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=444</guid>
		<description><![CDATA[My Wordpress powered website has been running for quite some time now, and today I finally replaced the default theme with something I like better,  Suffusion, and customized it to my needs.
I had installed some syntax highlighting plugins before but disabled them because I couldn&#8217;t get it to work properly. Now with the pretty new [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-449" title="Source code" src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-04-05-at-19.33.47.png" alt="Source code" width="287" height="225" />My Wordpress powered website has been running for quite some time now, and today I finally replaced the default theme with something I like better,  <a href="http://wordpress.org/extend/themes/suffusion">Suffusion,</a> and customized it to my needs.</p>
<p>I had installed some syntax highlighting plugins before but disabled them because I couldn&#8217;t get it to work properly. Now with the pretty new layout all posts with snippets of unhighlighted source code were a real eye-sore, so that needed to be fixed as wel.</p>
<p><span id="more-444"></span>For some unknown reason the <a href="http://wordpress.org/extend/plugins/syntaxhighlighter/">SyntaxHighlighter Evolved</a> plugin that I couldn&#8217;t get to do as I wanted before now works like a charm. The only difficult part was to get me some <a href="http://developer.apple.com/AppleScript/">AppleScript </a>highlighting. <a href="http://davidchambersdesign.com/applescript-syntax-highlighting/">David Chambers</a> has written a brush, so I only had to install that brush the <a href="http://www.viper007bond.com/wordpress-plugins/syntaxhighlighter/adding-a-new-brush-language/">proper way</a>. Creating the plugin was easy:</p>
<pre class="brush: php;">
&lt;?php
/*
Plugin Name: SyntaxHighlighter Evolved: AppleScript Brush
Description: Adds support for the Applescript language to the SyntaxHighlighter Evolved plugin.
Author: Ronald Chu
Version: 1.0.0
Author URI: http://www.rchu.nl/
*/

// SyntaxHighlighter Evolved doesn't do anything until early in the &quot;init&quot; hook, so best to wait until after that
add_action( 'init', 'syntaxhighlighter_applescript_regscript' );

// Tell SyntaxHighlighter Evolved about this new language/brush
add_filter( 'syntaxhighlighter_brushes', 'syntaxhighlighter_applescript_addlang' );

// Register the brush file with WordPress
function syntaxhighlighter_applescript_regscript() {
 wp_register_script( 'syntaxhighlighter-brush-applescript', plugins_url( 'shBrushAppleScript.js', __FILE__ ), array('syntaxhighlighter-core'), '1.2.3' );
}

// Filter SyntaxHighlighter Evolved's language array
function syntaxhighlighter_applescript_addlang( $brushes ) {
 $brushes['applescript'] = 'applescript';
 $brushes['osascript'] = 'applescript';

 return $brushes;
}
?&gt;
</pre>
<p>But at first the highlighting did not work on AppleScript snippets, and it took me quite some time to find out that I shouldn&#8217;t have copy-pasted the javascriptcode into <a href="http://www.vim.org/about.php">Vim</a> on my ssh shell. Some of the special characters in line 37 were transformed into in a question mark which broke the regular expression.</p>
<p>Now, as far as I know, only one thing is wrong; when I refresh quickly in Chrome (5.0.342.7 beta, OS X 10.6.2) some of the keywords do not light up. I do not know if it is a bug in Chome, SyntaxHighighter or the AppleScript brush, but it is something I can live with for now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/04/some-nice-layout-changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the language of a DIR-615</title>
		<link>http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/</link>
		<comments>http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 08:48:26 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LJ Crosspost]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=426</guid>
		<description><![CDATA[After my D-Link dir-615 broke down and I still had waranty I received a brand new one. Which is great, except for the fact that the web-interface was in German. Fortunately I do speak a little german and all the technical terms were the same as in english, but it was still anoying.
In (the german [...]]]></description>
			<content:encoded><![CDATA[<p>After my D-Link dir-615 <a href="http://www.rchu.nl/2010/02/the-mystery-of-the-blue-light/">broke down</a> and I still had waranty I received a brand new one. Which is great, except for the fact that the web-interface was in German. Fortunately I do speak a little german and all the technical terms were the same as in english, but it was still anoying.</p>
<p><span id="more-426"></span><a title="D-Link dir-615 web interface" href="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-03-29-at-10.34.46.png"><img class="alignright size-medium wp-image-427" title="D-Link dir-615 web interface" src="http://www.rchu.nl/wordpress/wp-content/uploads/Screen-shot-2010-03-29-at-10.34.46-300x162.png" alt="D-Link dir-615 web interface" width="300" height="162" /></a>In (the german version of) the <em>Maintenance » Firmware update</em> menu there is an option to upload a language pack. Hurrah, but those packs are nowhere to be found, not even after searching the web for several hours. So I decided to call customer services since they were so helpfull last time. They pointed to the <em>Maintenance » Save and restore</em> page where there exists an <em>Clear Language Pack</em> option. I hadn&#8217;t found that one yet, probably because of my poor german language skills.</p>
<p>I was kinda hoping to get the location(s) of all available language packs, so I could post them here and help all language-change-craving people across the world. Unfortunately customer services also did not know where to find these. But they must exist, since the german language pack was already installed on my device (and is now lost forever, I cannot change the language back to german). Why would D-Link choose not to share them with the world?</p>
<p>So, if you ever get a dir-615 in some unreadable language just go to the third menu, second submenu and click the bottom button.</p>
<p>Also, why do I get the belgium customer services when I dial the dutch phone number? The option of getting support in french is useless for most dutch people, and it was kinda hard to understand everything the guy at the other end said, because of the noisy connection and the <a href="http://en.wikipedia.org/wiki/Flemish">flemish</a> accent.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/03/changing-the-language-of-a-dir-615/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The mystery of the blue light</title>
		<link>http://www.rchu.nl/2010/02/the-mystery-of-the-blue-light/</link>
		<comments>http://www.rchu.nl/2010/02/the-mystery-of-the-blue-light/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 14:12:48 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LJ Crosspost]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=422</guid>
		<description><![CDATA[A couple of months ago I purchased a router/wifi accesspoint which has been running smoothly, as expected, until a few weeks ago. After I installed an extra electrical outlet and some cable channels for the power and ethernet cables it suddenly stopped working. After a frustrating evening where I at first thought I damaged some [...]]]></description>
			<content:encoded><![CDATA[<p><a title="D-Link DIR-615" href="http://www.rchu.nl/wordpress/wp-content/uploads/DLink-DIR-615.JPG"><img class="alignright size-medium wp-image-423" title="D-Link DIR-615" src="http://www.rchu.nl/wordpress/wp-content/uploads/DLink-DIR-615-300x299.jpg" alt="D-Link DIR-615" width="300" height="299" /></a>A couple of months ago I purchased a router/wifi accesspoint which has been running smoothly, as expected, until a few weeks ago. After I installed an extra electrical outlet and some cable channels for the power and ethernet cables it suddenly stopped working. After a frustrating evening where I at first thought I damaged some of the cables I got it working again. Until yesterday.</p>
<p><span id="more-422"></span>This time the diagnoses was simple. I couldn&#8217;t figure out how to fix it and the D-Link support desk (which was very easy to reach and provided excellent service, to my surprise) told me it was broken and I should return it to the shop where I bought it. Thats bad, but not at all difficult or complicated. After all, it&#8217;s just the wifi accesspoint that is broken so we can still hook up to the internet with the ethernet cables we have in most rooms (I installed those for gigabit access to the local fileserver).</p>
<p><a title="DLink DIR-615 WPA Button" href="http://www.rchu.nl/wordpress/wp-content/uploads/DLink-DIR-615-WPA-Button.JPG"><img class="alignleft size-thumbnail wp-image-424" style="margin: 6px;" title="DLink DIR-615 WPA Button" src="http://www.rchu.nl/wordpress/wp-content/uploads/DLink-DIR-615-WPA-Button-150x150.jpg" alt="DLink DIR-615 WPA Button" width="150" height="150" /></a>So what about the mystery then? Well, there is a button on the side of the device which is not mentioned in the manual and when I press it it lights up in blue for a while. No idea what it does, so I just ignored it. Until today, because all the device does now is lighting up that blue button. No other lights, no other activity. A search on the internet for &#8220;dir 615 blue light&#8221; brought me to <a href="http://www.dslreports.com/forum/r19642027-DIR615-Button-on-right-side-Flashes-Blue">some</a> <a href="http://forum.notebookreview.com/showthread.php?t=235529">forums</a> where I learned that it was for <a href="http://en.wikipedia.org/wiki/Wi-Fi_Protected_Setup">WPS</a> and that it is mentioned once in version 2.20 of the manual. Well then, another mystery solved.</p>
<p>Overall I was impressed with the support desk. There were no wainting lines, they promised to call me back and did withing a few hours, and, as opposed to the technical support mentioned on this forum the technical guy I got on the phone was fully capable to explain to me what this button was for. More points scored for D-Link&#8217;s support desk in the Netherlands.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2010/02/the-mystery-of-the-blue-light/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Ubuntu AFP server and the 1.5TB of Doom</title>
		<link>http://www.rchu.nl/2009/12/my-ubuntu-afp-server-and-the-1-5tb-of-doom/</link>
		<comments>http://www.rchu.nl/2009/12/my-ubuntu-afp-server-and-the-1-5tb-of-doom/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 08:04:13 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[AFP]]></category>
		<category><![CDATA[Time Machine]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=407</guid>
		<description><![CDATA[
The bad part about my girlfriend moving in with me is that my friend who was living with me left and took our local sever with him. We had combined our spare hardware to build us a server and used his old computer because he had 4 ATA controllers and I had only 2. So [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rchu.nl/wordpress/wp-content/uploads/hdd3.JPG"><img class="size-medium wp-image-436 alignright" title="Hard Disk" src="http://www.rchu.nl/wordpress/wp-content/uploads/hdd3-300x225.jpg" alt="Hard Disk" width="300" height="225" /></a></p>
<p>The bad part about my girlfriend moving in with me is that my friend who was living with me left and took our local sever with him. We had combined our spare hardware to build us a server and used his old computer because he had 4 ATA controllers and I had only 2. So now I had to configure my old PC to create a new server (&#8217;cause you just can&#8217;t live without one of those :) and bought an extra 1.5TB hard disk. That caused quite some trouble. Since the first wasn&#8217;t properly detected by my onboard SATA controller I returned it and the replacement seemed to work, only to be mounted as read-only after formatting it. After a while the disk wasn&#8217;t properly detected at all. I was surprised with two new disks having the exact same problem, fortunately so was the owner of the web shop where I bought it. He actually called me personally to discuss the situation and concluded that my SATA controller was probably to old to work properly with this big modern disk. So I bought an PCI eSATA controller which solved my problems.</p>
<p>Last weekend I took this card to my friend who also bought a new hard disk and was experiencing similar problems. After I put the card back my big disk wouldn&#8217;t mount anymore, though it worked fine when I booted the Ubuntu Live CD. Long story short (live cd: works, reinstall ubuntu: works, dist-upgrade: broken, reinstall: works, reboot: broken) there we suddenly some errors in the FS which fsck managed to fix.</p>
<p>Anyway, most of you aren&#8217;t at all interested in the above snipped of my life and want some technical information. Which you are going to get in the remaining part of this post. Hey, the benefit of people blogging technical stuff on their personal blog is that you have to read through the irrelevant stuff. Nothing is perfect, right?</p>
<p><span id="more-407"></span></p>
<h2>Setting up ubuntu as an file server</h2>
<p>I followed a<a href="http://www.kremalicious.com/2008/06/ubuntu-as-mac-file-server-and-time-machine-volume/"> great tutorial</a> to set up AFP on my server which was very easy and everything works like a charm. Well, almost everything.</p>
<h3>Permissions</h3>
<p>Since there are two users connecting to the machine there are files created by both that also need to be accessed by both users. Setting the setgid bit on the shares directories and adding both users to a common group is a start, unfortunately there doesn&#8217;t seem to be a way to set the umask for newly created files using netatalk, so in order for other users to be able to write/delete these files I just add the group write permission with a hourly cron job. It&#8217;s ugly, but it does the job.</p>
<h3>Time Machine</h3>
<p>After a short time of backing up with Time Machine I got the infamous <a href="http://discussions.apple.com/thread.jspa?threadID=2142747">error 109</a>.  Since this issue seems to have no solution and chances are slim Apple will do something about it since it they do not support it I decided to make only manual backups at night so they can run uninterrupted, and make backups of my time machine sparsebundle in case the backup gets broken. Yes, that does sound kind of redundant. It&#8217;s far from ideal, but a workable situation. I don&#8217;t need hourly backups anyway, I just want to have something in case of a hard disk crash or something like that.</p>
<p>Yesterday I read that <a href="http://netatalk.sourceforge.net/2.0/ReleaseNotes.html">netatalk 2.0.5 adds time machine support</a>! Since the current version of netatalk in the ubuntu repo is still 2.0.4 I removed it and downloaded the <a href="http://packages.debian.org/sid/netatalk">netatalk-2.0.5-2</a> (and <a href="http://packages.debian.org/sid/libdb4.8">libdb4.8</a> which it depends on and is also not yet in the ubuntu repo) packages from the debian site and installed them with <code>dpkg</code>. This was all much easier than I expected since people on the web were warning others that this is not the proper way to go and everything might get broken and so on. After some initial errors (removing the <code>.AppleDB</code> directories after error -5014 and removing the old sparsebundle as root after error 109 on an partially removed sparsebundle) it now seems to work just fine.</p>
<p>Interesting to note is that with this new time machine support I indeed do not have to create the sparsebundle by hand and that it is now named <code>Granny.sparsebundle</code> (Granny is my laptops name) without the MAC adres. Also interesting is that TM started to continue backing up in a copy of an old backup I made by hand named <code>Granny_macadres.copy.sparsebundle</code>. Apparently the name of the backup is much more flexible nowadays.</p>
<p>Now I&#8217;m just going to make backups wireless hourly without paying attention to it (and thus interrupting it when putting my laptop to sleep) as I used to with my old Time Capsule and see if the new version of netatalk solves the problems I had. For now I&#8217;ve interrupted the initial backup several times now and it is still running (and continuing every time where it was interrupted). So far so good, I can at least say that it works more reliable than with the previous version of netatalk.</p>
<p><strong>Update:</strong> after some initial success backing up to this AFP share is as unreliable as is was before, still getting a lot of 109 errors. Too bad. I decided to just buy an external USB/eSATA case and put the disk in that. It not expensive and works for sure, though I am deeply unhappy with the situation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2009/12/my-ubuntu-afp-server-and-the-1-5tb-of-doom/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>PDO: Configuring Apache, MySQL and PHP on OSX 10.5.7</title>
		<link>http://www.rchu.nl/2009/09/pdo-configuring-apache-mysql-and-php-on-osx-10-5-7/</link>
		<comments>http://www.rchu.nl/2009/09/pdo-configuring-apache-mysql-and-php-on-osx-10-5-7/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 11:00:51 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=376</guid>
		<description><![CDATA[I&#8217;d like to use PDO in conjunction with MySQL, but in the PHP installation shipped with OS X by default only pdo_sqlite is enabled. I do not want to compile my own Apache or PHP so the way to go is to simply add the pdo_mysql module. I followed these instructions but after running phpize [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to use PDO in conjunction with MySQL, but in the PHP installation shipped with OS X by default only pdo_sqlite is enabled. I do not want to compile my own Apache or PHP so the way to go is to simply add the pdo_mysql module. I followed <a href="http://gidden.net/tom/2008/06/30/mysql-and-pdo-on-os-x-leopard-intel/">these</a> instructions but after running phpize there were some warings on my screen and no makefile to be found. My current PHP version is 5.2.8 and I used the source of 5.3.0, so I tried again with 5.2.10 (since no other version was available at the <a href="http://www.php.net/downloads.php">PHP download page</a>). Both yield the same result, namely that it compiles, installs and won&#8217;t start.</p>
<p><code> PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so' - (null) in Unknown on line 0</code></p>
<p>Following instructions in the comment to remove all architectures but the x86_64 have no effect. I think I have to compile my own PHP installation and have apache use that. Which sucks so much I decided to just wait for Snow Leopard and pray that either pdo_mysql is installed or dynamicly loading libraries is allowed there. I am happy to inform you all that the first is the case. Hurray!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2009/09/pdo-configuring-apache-mysql-and-php-on-osx-10-5-7/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OS X, Apache and symbolic links</title>
		<link>http://www.rchu.nl/2009/09/os-x-apache-and-symbolic-links/</link>
		<comments>http://www.rchu.nl/2009/09/os-x-apache-and-symbolic-links/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 10:55:58 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[macbook]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=399</guid>
		<description><![CDATA[I use my laptop a lot for web developement, and for some projects I have more files than just the web documents that Apache needs to see. For those I have a directory in my ~/Documents with (amongst other things) a httpdocs directory. I&#8217;d like to just see that in my browser by creating a [...]]]></description>
			<content:encoded><![CDATA[<p>I use my laptop a lot for web developement, and for some projects I have more files than just the web documents that Apache needs to see. For those I have a directory in my ~/Documents with (amongst other things) a httpdocs directory. I&#8217;d like to just see that in my browser by creating a symbolic link in my ~/Sites directory. This proved to be somewhat difficult in OS X 10.5 and also in my fresh installation of 10.6.</p>
<p><span id="more-399"></span></p>
<h2>Creating a web symlink in 10.6</h2>
<h3>Configure Apache</h3>
<p>The installation of Apache that ships with OS X I use doesn&#8217;t allow symlinks by default, so I&#8217;ve added <code>Options +FollowSymLinks</code> in the Apache configuration. These are located in <code>/private/etc/apache2</code> and while you could enable this in <code>httpd.conf</code> I like to keep the system-wide configuration as clean as possible and edited the  (ronald is my username) instead. I&#8217;ve also added <code>AllowOverride All</code> there to be able to use <code>.htaccess</code> files, but thats another topic.</p>
<p>Restart Apache by disabling and enabling &#8220;Web Sharing&#8221; in the sharing preference pane</p>
<h3>Create a symlink</h3>
<p>That&#8217;s just a matter of executing<code> "ln -s ../Documents/website ." </code> in the <code>~/Sites</code> directory. Alas browsing to <code>http://localhost/~ronald/website</code> gives a 403 (forbidden) page. Inspecting the serverlog tells me that either apache is not allowed to follow symlinks (which it is) or the _www user hasn&#8217;t got enough rights to access <code>~/Documents/website</code>.</p>
<h3>It&#8217;s all about permissions</h3>
<p>Well, that&#8217;s just stupid because the directory is readable/executable for everyone. Changing my <code>~/Documents</code> folder to be world readable/executable did the trick. Apparently every directory in the path needs to be accessible. Damn me and my inferior UNIX permissions knowledge!</p>
<p>So it&#8217;s either making my entire Documents directory world readable, which I don&#8217;t really like, or adding the _www user and myself to some group and change ownership of my Documents directory to that group to make my entire Documents folder readable for myself and the _www user, which is slightly less bad. So chmodding everything except the directories linked for web access inside the Documents folder 700 seems the right way to go.</p>
<p>In 10.5 the holy grail was to mess around with the<a href="http://www.red-sweater.com/blog/427/out-of-my-access-control"> Access Control List</a> but that wasn&#8217;t needed in 10.6, so I suggest leaving that part alone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2009/09/os-x-apache-and-symbolic-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard</title>
		<link>http://www.rchu.nl/2009/09/snow-leopard/</link>
		<comments>http://www.rchu.nl/2009/09/snow-leopard/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 07:14:32 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=385</guid>
		<description><![CDATA[Once again I&#8217;ve installed some new OS and write a small post about it. This time it&#8217;s all about Snow Leopard and as usual this is probably more interesting for myself as a checklist sort of thing than for the world to read. It gives more order and satisfaction in the long proces of installing [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rchu.nl/wordpress/wp-content/uploads/snow-leopard.jpg"><img class="alignright size-medium wp-image-531" title="Snow Leopard" src="http://www.rchu.nl/wordpress/wp-content/uploads/snow-leopard-300x187.jpg" alt="Snow Leopard" width="300" height="187" /></a>Once again I&#8217;ve installed some new OS and write a small post about it. This time it&#8217;s all about Snow Leopard and as usual this is probably more interesting for myself as a checklist sort of thing than for the world to read. It gives more order and satisfaction in the long proces of installing and customisation and it functions as a central storage for all cool applications, tweaks and scripts that I install and create to make OS X function just the way I like it.</p>
<p><span id="more-385"></span></p>
<h2>Installation</h2>
<p>I&#8217;ve decided not to upgrade my existing installation of Leopard but to go for a fresh clean installation. Leopard was my first OS X installation and I&#8217;ve done quite some installating, customization and so forth and it sounded like a good idea to just start fresh. I remember reading something about a clean install option, but the installer just asks me for the location, gives me some options what to install and starts right away. I had to abort, reboot, and then used the disk utility on the installer DVD to first format my hard drive. Installation went smooth from that point on.</p>
<p>First impressions are as expected, it works smooth. I am surprised about the time it takes to wake from sleep, almost instantly, but that can also be because this installation is fresh and I was used to my old cluttered Leopard.</p>
<h2>Afterwards</h2>
<p>Time to install some.</p>
<ul>
<li>Firefox 3.5</li>
<li>Growl 1.2b4, the latest beta of 1.2 because 1.1 is uncompatible with snow leopard. It seems to work fine, as does the HardwareGrowler.</li>
<li>Perian 1.1.4</li>
<li>Spark 3.0b9 for global hotkeys</li>
<li>iWork &#8216;09 en iLife &#8216;09</li>
<li>Software updates (10.6.1)</li>
<li>Textmate</li>
<li>Latest flash version since <a href="http://www.macrumors.com/2009/09/03/snow-leopard-installation-downgrades-flash-player-to-vulnerable-version/">Snow Leopard ships with an unsafe one.</a></li>
<li>MacTex</li>
</ul>
<p>And to tweak some.</p>
<ul>
<li>Copied my old <code>~/Music</code> directory, iTunes starts with my good old library. Hurray</li>
<li>Copied my old <code>~/Photos</code> directory, iPhoto cannot open (made with a newer version). Running another software update was the key to success.</li>
<li>The first sync with my iPhone authorizes my computer with the iTunes store and gives me all my contacts back. Nice!</li>
<li>Uncomment the line <code>LoadModule php5_module        libexec/apache2/libphp5.so</code> in <code>/etc/apache2/httpd.conf</code> to enable php5. Fortunately for me, snow leopard provides me with <code>pdo_mysql</code> which Leopard did not (and it wasn&#8217;t possible to just add that module).</li>
</ul>
<p>And to get stuck at some.</p>
<ul>
<li>System clock, going to <em>System preferences &gt; International &gt; Formats &gt; Times (customize button)</em> and changing the medium format doesn&#8217;t work anymore :(</li>
</ul>
<p>My ToDo list also has some.</p>
<ul>
<li>mail multicolumn</li>
<li>mail imap subfolder check</li>
<li>spark firewall status scripts</li>
<li>adium</li>
</ul>
<h2>More Tweaks</h2>
<h3>Firewall scripts</h3>
<p>I take my laptop everywhere so I want to keep the built-in firewall fully closed at all times. I do, however, sometimes take it down if some sharing/program/game doesn&#8217;t work, and I almost always forget to enable it again afterewards. Thats what the following script is for. I use the cron daemon to run it every 5 minutes and it checks the firewall status and gives me a growl notification if it&#8217;s disabled.</p>
<pre class="brush: bash;">
#!/bin/sh
if [ `defaults read /Library/Preferences/com.apple.alf globalstate` -eq &amp;quot;0&amp;quot; ]; then
  echo Firewall is currently disabled | /usr/local/bin/growlnotify -a /Applications/System\ Preferences.app -t Warning;
fi
</pre>
<p>I also added an applescript to a global hotkey in Spark to change the firewall status. It checks the status, displays it with the options to change it with a timeout of 5 seconds.</p>
<pre class="brush: applescript;">
# brings the dialog window to front
delay 1
tell me to activate

set fw_status to (do shell script &amp;quot;defaults read /Library/Preferences/com.apple.alf globalstate&amp;quot;)

if fw_status is equal to &amp;quot;2&amp;quot; then
  set dlg_result to display dialog &amp;quot;Allow only essential services&amp;quot; with title &amp;quot;Firewall Status&amp;quot; buttons {&amp;quot;All&amp;quot;, &amp;quot;Specific&amp;quot;, &amp;quot;Essential&amp;quot;} default button 3 cancel button 3 with icon note giving up after 10
  set res to button returned of dlg_result
else if fw_status is equal to &amp;quot;1&amp;quot; then
  set dlg_result to display dialog &amp;quot;Set access for specific services&amp;quot; with title &amp;quot;Firewall Status&amp;quot; buttons {&amp;quot;All&amp;quot;, &amp;quot;Specific&amp;quot;, &amp;quot;Essential&amp;quot;} default button 2 cancel button 2 with icon caution giving up after 10
  set res to button returned of dlg_result
else if fw_status is equal to &amp;quot;0&amp;quot; then
  set dlg_result to display dialog &amp;quot;Allow all incomming connections&amp;quot; with title &amp;quot;Firewall Status&amp;quot; buttons {&amp;quot;All&amp;quot;, &amp;quot;Specific&amp;quot;, &amp;quot;Essential&amp;quot;} default button 1 cancel button 1 with icon stop giving up after 10
  set res to button returned of dlg_result
end if

if res is equal to &amp;quot;All&amp;quot; then
  do shell script &amp;quot;defaults write /Library/Preferences/com.apple.alf globalstate 0&amp;quot;
  display dialog &amp;quot;Set to 'Allow all incomming connections'&amp;quot; with title &amp;quot;Firewall Status&amp;quot; buttons {&amp;quot;OK&amp;quot;} default button 1
else if res is equal to &amp;quot;Specific&amp;quot; then
  do shell script &amp;quot;defaults write /Library/Preferences/com.apple.alf globalstate 1&amp;quot;
  display dialog &amp;quot;Set to 'Set access for specific services'&amp;quot; with title &amp;quot;Firewall Status&amp;quot; buttons {&amp;quot;OK&amp;quot;} default button 1
else if res is equal to &amp;quot;Essential&amp;quot; then
  do shell script &amp;quot;defaults write /Library/Preferences/com.apple.alf globalstate 2&amp;quot;
  display dialog &amp;quot;Set to 'Allow only essential services'&amp;quot; with title &amp;quot;Firewall Status&amp;quot; buttons {&amp;quot;OK&amp;quot;} default button 1
end if
</pre>
<p>And now I can easily change the status of my firewall</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2009/09/snow-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What is up with Bing?</title>
		<link>http://www.rchu.nl/2009/09/what-is-up-with-bing/</link>
		<comments>http://www.rchu.nl/2009/09/what-is-up-with-bing/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 12:58:43 +0000</pubDate>
		<dc:creator>ronald</dc:creator>
				<category><![CDATA[Computing]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[LJ Crosspost]]></category>
		<category><![CDATA[Bing]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.rchu.nl/?p=380</guid>
		<description><![CDATA[I only just learned about Bing, watched a screencast and played around with it. I was hoping to be impressed by the nifty features demonstrated in the screencast, but everything I enter in Bing just gives me a plain old search result. I even read the help documents and entered the examples they gave, but [...]]]></description>
			<content:encoded><![CDATA[<p>I only just learned about <a href="http://www.bing.com/">Bing</a>, watched a <a href="http://d7.allthingsd.com/20090528/d7-video-steve-ballmer-introduces-bing/">screencast</a> and played around with it. I was hoping to be impressed by the nifty features demonstrated in the screencast, but everything I enter in Bing just gives me a plain old search result. I even read the <a href="http://help.live.com/help.aspx?project=wl_searchv1&amp;market=nl-NL&amp;querytype=keyword&amp;query=hcraesbew&amp;domain=www.bing.com:80#toc">help documents</a> and entered the examples they gave, but none of those examples gave any special result.</p>
<p>So I am puzzled. Why would Microsoft launch a new product, show off its great features and then put a website live that doesn&#8217;t do any of the promised features? Looks to me like they have just doomed Bing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.rchu.nl/2009/09/what-is-up-with-bing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
