<?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>Phil Bayfield</title>
	<atom:link href="http://www.philbayfield.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.philbayfield.com</link>
	<description>A little about me, my photos and some general geeky stuff!</description>
	<lastBuildDate>Wed, 02 Nov 2011 01:59:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>New features in PHP 5.4</title>
		<link>http://www.philbayfield.com/2011/11/02/new-features-in-php-5-4/</link>
		<comments>http://www.philbayfield.com/2011/11/02/new-features-in-php-5-4/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 01:59:36 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=585</guid>
		<description><![CDATA[The next iteration of 5.4 looks like it&#8217;s more focused on cleaning up the language than features. It appears many of the previously deprecated functions are now, as promised, removed completely. As this article is about features, here is a quick summary of the other changes: Removed: break/continue $var syntax Removed: register_globals, allow_call_time_pass_reference, and register_long_arrays [...]]]></description>
			<content:encoded><![CDATA[<p>The next iteration of 5.4 looks like it&#8217;s more focused on cleaning up the language than features.</p>
<p>It appears many of the previously deprecated functions are now, as promised, removed completely. As this article is about features, here is a quick summary of the other changes:</p>
<ul>
<li>Removed: break/continue $var syntax</li>
<li>Removed: register_globals, allow_call_time_pass_reference, and register_long_arrays ini options</li>
<li>Removed: session_is_registered(), session_registered(), and session_unregister()</li>
</ul>
<p>This information is based on alpha/beta releases and is subject to change.</p>
<p>Onwards to the new features&#8230;</p>
<p><strong>Traits support</strong></p>
<p>PHP 5.4 includes traits which allow reusable groups of methods to be used from any class.</p>
<p>Here is an example:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">trait someMethods<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> doSomething<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> doSomethingElse<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p>We can then use the above trait in an class using the use statement:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> someClass <span style="color: #000000; font-weight: bold;">extends</span> someParent<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">use</span> someMethods<span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> doSomethingLocaly<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p>More information about traits can be found in the manual: <div style="float: left; text-align: center">
			    <a href="http://php.net/manual/en/language.oop5.traits.php" target="_blank"><img src="http://simple.thumbshots.com/image.aspx?cid=1508&v=1&w=200&h=150&url=http://php.net/manual/en/language.oop5.traits.php" /></a><br /><a href="http://php.net/manual/en/language.oop5.traits.php" target="_blank">http://php.net/manual/en/language.oop...</a></div><br style="clear: both" /></p>
<p><strong>Array dereferencing</strong></p>
<p>As PHP has had object dereferencing for ages, this is something that is really long overdue and addresses the inconsistency between object and array return values.</p>
<p>A quick/common example of the existing object dereferencing:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> someClass<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$_someVar</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$_someOtherVar</span><span style="color: #339933;">;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setSomeVar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_someVar <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setSomeOtherVar<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_someOtherVar <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000088;">$class</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> someClass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$class</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setSomeVar</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setSomeOtherVar</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></div></div>
<p>Now we can do the same with arrays, without the current need to assign the array return value to a variable before we can access it&#8217;s contents:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> someOtherClass<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getArray<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">5</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000088;">$class</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> someOtherClass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #000088;">$third</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$class</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getArray</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></div></div>
<p>This is a rather pointless example, but demonstrates the new functionality.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2011%2F11%2F02%2Fnew-features-in-php-5-4%2F&amp;title=New%20features%20in%20PHP%205.4" id="wpa2a_2"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2011/11/02/new-features-in-php-5-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing sqlite on a rooted Android phone.</title>
		<link>http://www.philbayfield.com/2011/04/08/installing-sqlite-on-a-rooted-android-phone/</link>
		<comments>http://www.philbayfield.com/2011/04/08/installing-sqlite-on-a-rooted-android-phone/#comments</comments>
		<pubDate>Fri, 08 Apr 2011 10:16:23 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=575</guid>
		<description><![CDATA[Many rooting tools install the sqlite3 binary by default, but the pre-rooted rom on my SGS seems to be an exception, so here is a guide to install it manually. You will need the SDK tools on your computer for this to work! Connect the phone, bring up a shell and get root permissions: $ [...]]]></description>
			<content:encoded><![CDATA[<p>Many rooting tools install the sqlite3 binary by default, but the pre-rooted rom on my SGS seems to be an exception, so here is a guide to install it manually.</p>
<p><strong>You will need the SDK tools on your computer for this to work!</strong></p>
<p>Connect the phone, bring up a shell and get root permissions:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ adb shell<br />
/ $ su<br />
#</div></div>
<p>Find the device for the system partition:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mount &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br />
rootfs / rootfs ro,relatime 0 0<br />
proc /proc proc rw,relatime 0 0<br />
sys /sys sysfs rw,relatime 0 0<br />
/dev/block/stl11 /cache ext4 rw,noatime,barrier=0,data=writeback,noauto_da_alloc 0 0<br />
/dev/block/stl10 /dbdata ext4 rw,noatime,barrier=0,nodelalloc,data=ordered,noauto_da_alloc 0 0<br />
/dev/block/mmcblk0p2 /data ext4 rw,noatime,barrier=1,data=ordered,noauto_da_alloc 0 0<br />
tmpfs /dev tmpfs rw,relatime,mode=755 0 0<br />
devpts /dev/pts devpts rw,relatime,mode=600 0 0<br />
none /acct cgroup rw,relatime,cpuacct 0 0<br />
/dev/block/stl6 /mnt/.lfs j4fs rw,relatime 0 0<br />
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0<br />
none /dev/cpuctl cgroup rw,relatime,cpu 0 0<br />
/dev/block/stl9 /system rfs ro,relatime,vfat,log_off,check=no,gid/uid/rwx,iocharset=utf8 0 0<br />
/dev/block/stl3 /efs rfs rw,nosuid,nodev,relatime,vfat,llw,check=no,gid/uid/rwx,iocharset=utf8 0 0<br />
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0<br />
/dev/block/vold/179:9 /mnt/sdcard/external_sd vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0<br />
/dev/block/vold/179:9 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,noatime,nodiratime,uid=1000,gid=1015,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0<br />
tmpfs /mnt/sdcard/external_sd/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0</div></div>
<p>The important bit here is <strong>/dev/block/stl9 /system rfs</strong> which is needed for the next step.</p>
<p>Remount the file system rw (replace rfs and /dev/block/stl9 with the values from the output of mount):</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mount -o remount,rw -t rfs /dev/block/stl9 /system</div></div>
<p>Next, in a separate terminal copy the sqlite3 binary to the phone (can be obtained from the Super One Click package http://www.shortfuse.org/):</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ adb push sqlite3 /sdcard/<br />
42 KB/s (24120 bytes in 0.557s)</div></div>
<p>Back in the original terminal, move the binary to /system/bin and set permissions:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># cp /sdcard/sqlite3 /system/bin<br />
# chmod 4755 /system/bin/sqlite3</div></div>
<p>Finally, remount the /system filesystem read only again:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"># mount -o remount,ro -t rfs /dev/block/stl9 /system</div></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2011%2F04%2F08%2Finstalling-sqlite-on-a-rooted-android-phone%2F&amp;title=Installing%20sqlite%20on%20a%20rooted%20Android%20phone." id="wpa2a_4"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2011/04/08/installing-sqlite-on-a-rooted-android-phone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The most awesomest design pattern, ever to exist and that ever will exist!</title>
		<link>http://www.philbayfield.com/2011/01/28/the-most-awesomest-design-pattern-ever-to-exist-and-that-ever-will-exist/</link>
		<comments>http://www.philbayfield.com/2011/01/28/the-most-awesomest-design-pattern-ever-to-exist-and-that-ever-will-exist/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 09:24:32 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=565</guid>
		<description><![CDATA[At my current day job, someone came up with this design pattern and has implemented it in almost every class throughout the entire application, there are probably close to 100 implementations of this &#8220;pattern&#8221;. I had to post it because it&#8217;s just so awesome! Firstly let&#8217;s late a look at the traditional factory method, it&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>At my current day job, someone came up with this design pattern and has implemented it in almost every class throughout the entire application, there are probably close to 100 implementations of this &#8220;pattern&#8221;. I had to post it because it&#8217;s just so awesome!</p>
<p>Firstly let&#8217;s late a look at the traditional factory method, it&#8217;s usually a static method that instantiates 1 or more objects and returns you the object.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> MyClass<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> factory<span style="color: #009900;">&#40;</span><span style="color: #000088;">$some</span><span style="color: #339933;">,</span> <span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000088;">$it</span> <span style="color: #339933;">=</span> create_some_object<span style="color: #009900;">&#40;</span><span style="color: #000088;">$some</span><span style="color: #339933;">,</span> <span style="color: #000088;">$params</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000088;">$it</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Simple and effective.</p>
<p>Behold! The tri-class factory method, 3 times more awesome than the normal factory method!</p>
<p>Firstly create your class as normal:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> MyClass<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">...</span>code<span style="color: #339933;">...</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Then create a factory class, (you&#8217;re thinking, &#8220;what???&#8221;, but don&#8217;t think, just do):</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> MyClassFactory<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000088;">$factory</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">...</span>static methods<span style="color: #339933;">...</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Note, some very important features, you must have the public static $factory variable, and it must be initialised to null, despite this being the default behaviour of PHP. The methods also follow a very important structure too, but we&#8217;ll get to this in a moment.</p>
<p>Finally, the 3rd and final class, the &#8220;Factory Impl&#8221; class:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> MyClassFactoryImpl<br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #339933;">...</span>non<span style="color: #339933;">-</span>static methods<span style="color: #339933;">...</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Then to put everything together we need to assign an instance of &#8220;Factory Impl&#8221; to the static $factory variable in the Factory class, this should be down outside of all the object structures, for added coolness:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">MyClassFactory<span style="color: #339933;">::</span><span style="color: #000088;">$factory</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MyClassFactoryImpl<span style="color: #339933;">;</span></div></div>
<p>Confused? You should be. But this is just the start of the awesomeness.</p>
<p>Next, you need to implement the factory methods, they should be implemented as normal public methods in the &#8220;Factory Impl&#8221; class, e.g.</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getById<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> object<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>For each method you create, you also need a static function to call this method in the factory class:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> getById<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$factory</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getById</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>Repeat for all your factory methods, and you&#8217;re done!</p>
<p>I would recommend that to make it as helpful as possible for other developers, make sure you put everything in one file and try and call the file something different from any of the class names you&#8217;ve used, this will ensure that they will probably have to use a require_once each time they use it as it&#8217;ll confuse most autoloaders.</p>
<p>You should end up with something like this:</p>
<div class="codecolorer-container php default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="php codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">class</span> MyClass<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> someMethod<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> someOtherMethod<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">class</span> MyClassFactoryImpl<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getEmpty<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> MyClass<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getById<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> MyClass<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #000000; font-weight: bold;">class</span> MyClassFactory<br />
<span style="color: #009900;">&#123;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000088;">$factory</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> getEmpty<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$factory</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getEmpty</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
&nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> getById<span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$factory</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getById</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; <span style="color: #009900;">&#125;</span><br />
<br />
<span style="color: #009900;">&#125;</span><br />
<br />
MyClassFactory<span style="color: #339933;">::</span><span style="color: #000088;">$factory</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> MyClassFactoryImpl<span style="color: #339933;">;</span></div></div>
<p>There is no denying the awesomeness of this pattern, 3 times more objects, 3 times more memory, 3 times bigger stack, 10 times more code, god knows how many times more inefficient, but infinitely more fun! <img src='http://www.philbayfield.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Next week, stay tuned for the &#8220;super god&#8221; class!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2011%2F01%2F28%2Fthe-most-awesomest-design-pattern-ever-to-exist-and-that-ever-will-exist%2F&amp;title=The%20most%20awesomest%20design%20pattern%2C%20ever%20to%20exist%20and%20that%20ever%20will%20exist%21" id="wpa2a_6"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2011/01/28/the-most-awesomest-design-pattern-ever-to-exist-and-that-ever-will-exist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating to MySQL 5.5 on Ubuntu</title>
		<link>http://www.philbayfield.com/2011/01/26/migrating-to-mysql-5-5-on-ubuntu/</link>
		<comments>http://www.philbayfield.com/2011/01/26/migrating-to-mysql-5-5-on-ubuntu/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 02:36:31 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=560</guid>
		<description><![CDATA[MySQL 5.5 has been GA since December 2010, however there are currently no deb packages available. Ubuntu takes all (or most of) it&#8217;s packages from the unstable Debian branch, hence the natural order of things is for Debian maintainers to do the leg work (e.g. creating the build scripts) and then Ubuntu can use this [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL 5.5 has been GA since December 2010, however there are currently no deb packages available. Ubuntu takes all (or most of) it&#8217;s packages from the unstable Debian branch, hence the natural order of things is for Debian maintainers to do the leg work (e.g. creating the build scripts) and then Ubuntu can use this to build similar or newer minor versions for the Ubuntu OS. I suspect that as 5.5 is a major release and there are a considerable number of changes that the build scripts take a considerable amount of time to write and possibly some of the Debian modifications/patches need updates to ensure compatibility too, hence the long delay.</p>
<p>However, we can install MySQL 5.5 from the generic tarball and make a few &#8220;tweaks&#8221; to maintain the default Ubuntu structures and settings. </p>
<p>There are more straight forward ways to install MySQL, however the intention of this guide is to allow us to easily upgrade via multiple future available routes with minimal effort (e.g. via deb packages, or in their absence newer generic tar distributions).</p>
<p>1. Create user/group</p>
<p>Note: I manually chose system group ids looking at the latest system group id in /etc/passwd and /etc/group</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">groupadd -r -g 108 mysql<br />
useradd -r -g mysql -u 106 mysql</div></div>
<p>2. Create folders</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mkdir /var/lib/mysql<br />
mkdir /var/log/mysql<br />
mkdir /usr/lib/mysql<br />
mkdir /usr/share/mysql<br />
mkdir -p /etc/mysql/conf.d<br />
mkdir /var/run/mysqld</div></div>
<p>3. Set a few folder permissions</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">chown mysql:adm /var/log/mysql<br />
chmod 750 /var/log/mysql/<br />
chmod g+s /var/log/mysql/<br />
chown mysql:mysql /var/run/mysqld</div></div>
<p>4. Download the source and copy/move it to the default install folder in /usr/local. (This is not standard Ubuntu, however due to some of the compilation options on the tar package it avoids a few issues but maintains Ubuntu paths.)</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">wget http://www.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.8-linux2.6-x86_64.tar.gz/from/ftp://ftp.mirrorservice.org/sites/ftp.mysql.com/<br />
tar xzf mysql-5.5.8-linux2.6-x86_64.tar.gz<br />
mv mysql-5.5.8-linux2.6-x86_64 mysql<br />
mv mysql /usr/local/</div></div>
<p>5. Move files to the Ubuntu locations and create simlinks &#8220;just in case&#8221; MySQL has something hard coded into the build that cannot be changed via the config.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /usr/local/mysql/<br />
mv bin/* /usr/bin/<br />
rmdir bin/<br />
ln -s /usr/bin/<br />
cp lib/libmysqlclient* /usr/lib<br />
cp -r lib/plugin /usr/lib/mysql/<br />
cp support-files/* /usr/share/mysql<br />
cp -r share/* /usr/share/mysql<br />
rm -r share<br />
ln -s /usr/share/mysql share</div></div>
<p>6. Create the default data files and move them to /var/lib/mysql</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">scripts/mysql_install_db<br />
cp -r data/* /var/lib/mysql<br />
chown -R mysql:mysql /var/lib/mysql<br />
chmod -R 700 /var/lib/mysql<br />
rm -r data<br />
ln -s /var/lib/mysql data</div></div>
<p>7. Copy the init script over to /etc/init.d and modify to suit our needs</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cp support-files/mysql.server /etc/init.d/mysql</div></div>
<p>Edit with your favorite text editor and ensure the following are set:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">basedir=/usr/local/mysql<br />
datadir=/var/lib/mysql</div></div>
<p>8. Add my.cnf, the default 5.1 file will do, with 1 or 2 modifications. Specifically, check the basedir and datadir are set correctly, ensure Innodb is the default storage engine (as per 5.5) and note the new syntax for slow query logging (disabled by default). It would be advisable to set common Innodb options, e.g. pool size.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#<br />
# The MySQL database server configuration file.<br />
#<br />
# You can copy this to one of:<br />
# - &quot;/etc/mysql/my.cnf&quot; to set global options,<br />
# - &quot;~/.my.cnf&quot; to set user-specific options.<br />
#<br />
# One can use all long options that the program supports.<br />
# Run program with --help to get a list of available options and with<br />
# --print-defaults to see which it would actually understand and use.<br />
#<br />
# For explanations see<br />
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html<br />
<br />
# This will be passed to all mysql clients<br />
# It has been reported that passwords should be enclosed with ticks/quotes<br />
# escpecially if they contain &quot;#&quot; chars...<br />
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.<br />
[client]<br />
port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 3306<br />
socket &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /var/run/mysqld/mysqld.sock<br />
<br />
# Here is entries for some specific programs<br />
# The following values assume you have at least 32M ram<br />
<br />
# This was formally known as [safe_mysqld]. Both versions are currently parsed.<br />
[mysqld_safe]<br />
socket &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /var/run/mysqld/mysqld.sock<br />
nice &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 0<br />
<br />
[mysqld]<br />
#<br />
# * Basic Settings<br />
#<br />
<br />
#<br />
# * IMPORTANT<br />
# &nbsp; If you make changes to these settings and your system uses apparmor, you may<br />
# &nbsp; also need to also adjust /etc/apparmor.d/usr.sbin.mysqld.<br />
#<br />
<br />
user &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= mysql<br />
socket &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /var/run/mysqld/mysqld.sock<br />
port &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 3306<br />
basedir &nbsp; &nbsp; &nbsp; &nbsp; = /usr/local/mysql<br />
datadir &nbsp; &nbsp; &nbsp; &nbsp; = /var/lib/mysql<br />
tmpdir &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /tmp<br />
skip-external-locking<br />
#<br />
# Instead of skip-networking the default is now to listen only on<br />
# localhost which is more compatible and is not less secure.<br />
bind-address &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 127.0.0.1<br />
#<br />
# * Fine Tuning<br />
#<br />
key_buffer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 16M<br />
max_allowed_packet &nbsp; &nbsp; &nbsp;= 16M<br />
thread_stack &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 192K<br />
thread_cache_size &nbsp; &nbsp; &nbsp; = 8<br />
# This replaces the startup script and checks MyISAM tables if needed<br />
# the first time they are touched<br />
myisam-recover &nbsp; &nbsp; &nbsp; &nbsp; = BACKUP<br />
#max_connections &nbsp; &nbsp; &nbsp; &nbsp;= 100<br />
#table_cache &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 64<br />
#thread_concurrency &nbsp; &nbsp; = 10<br />
#<br />
# * Query Cache Configuration<br />
#<br />
query_cache_limit &nbsp; &nbsp; &nbsp; = 1M<br />
query_cache_size &nbsp; &nbsp; &nbsp; &nbsp;= 16M<br />
#<br />
# * Logging and Replication<br />
#<br />
# Both location gets rotated by the cronjob.<br />
# Be aware that this log type is a performance killer.<br />
# As of 5.1 you can enable the log at runtime!<br />
#general_log_file &nbsp; &nbsp; &nbsp; &nbsp;= /var/log/mysql/mysql.log<br />
#general_log &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 1<br />
<br />
log_error &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /var/log/mysql/error.log<br />
<br />
# Here you can see queries with especially long duration<br />
#slow-query-log<br />
#slow-query-log-file &nbsp; &nbsp; = /var/log/mysql/mysql-slow.log<br />
#long_query_time &nbsp; &nbsp; &nbsp; &nbsp; = 2<br />
#log-queries-not-using-indexes<br />
#<br />
# The following can be used as easy to replay backup logs or for replication.<br />
# note: if you are setting up a replication slave, see README.Debian about<br />
# &nbsp; &nbsp; &nbsp; other settings you may need to change.<br />
#server-id &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 1<br />
#log_bin &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /var/log/mysql/mysql-bin.log<br />
expire_logs_days &nbsp; &nbsp; &nbsp; &nbsp;= 10<br />
max_binlog_size &nbsp; &nbsp; &nbsp; &nbsp; = 100M<br />
#binlog_do_db &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = include_database_name<br />
#binlog_ignore_db &nbsp; &nbsp; &nbsp; = include_database_name<br />
<br />
#<br />
# * InnoDB<br />
#<br />
# InnoDB is enabled by default with a 10MB datafile in /var/lib/mysql/.<br />
# Read the manual for more InnoDB related options. There are many!<br />
default_storage_engine &nbsp;= InnoDB<br />
<br />
#<br />
# * Security Features<br />
#<br />
# Read the manual, too, if you want chroot!<br />
# chroot = /var/lib/mysql/<br />
#<br />
# For generating SSL certificates I recommend the OpenSSL GUI &quot;tinyca&quot;.<br />
#<br />
# ssl-ca=/etc/mysql/cacert.pem<br />
# ssl-cert=/etc/mysql/server-cert.pem<br />
# ssl-key=/etc/mysql/server-key.pem<br />
<br />
<br />
<br />
[mysqldump]<br />
quick<br />
quote-names<br />
max_allowed_packet &nbsp; &nbsp; &nbsp;= 16M<br />
<br />
[mysql]<br />
#no-auto-rehash # faster start of mysql but no tab completition<br />
<br />
[isamchk]<br />
key_buffer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 16M<br />
<br />
#<br />
# * IMPORTANT: Additional settings that can override those from this file!<br />
# &nbsp; The files must end with '.cnf', otherwise they'll be ignored.<br />
#<br />
!includedir /etc/mysql/conf.d/</div></div>
<p>9. Start the server!</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">/etc/init.d/mysql start</div></div>
<p>If the server fails to start, check /var/log/mysql/error.log for clues.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2011%2F01%2F26%2Fmigrating-to-mysql-5-5-on-ubuntu%2F&amp;title=Migrating%20to%20MySQL%205.5%20on%20Ubuntu" id="wpa2a_8"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2011/01/26/migrating-to-mysql-5-5-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Funny Google in-line search results</title>
		<link>http://www.philbayfield.com/2011/01/25/funny-google-in-line-search-results/</link>
		<comments>http://www.philbayfield.com/2011/01/25/funny-google-in-line-search-results/#comments</comments>
		<pubDate>Tue, 25 Jan 2011 13:29:16 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=551</guid>
		<description><![CDATA[Here are a few amusing in-line searches on Google and Google images: Especially funny how several pictures of horses appear here. More horses! The internet obviously hold Sarah Jessica Parker in quite high regard!]]></description>
			<content:encoded><![CDATA[<p>Here are a few amusing in-line searches on Google and Google images:</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2011/01/sjp1.png"><img src="http://www.philbayfield.com/wp-content/uploads/2011/01/sjp1-640x299.png" alt="" title="SJP1" width="640" height="299" class="alignleft size-large wp-image-552" /></a><br />
<br style="clear:both"/></p>
<p>Especially funny how several pictures of horses appear here.</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2011/01/sjp2.png"><img src="http://www.philbayfield.com/wp-content/uploads/2011/01/sjp2-640x284.png" alt="" title="SJP2" width="640" height="284" class="alignleft size-large wp-image-553" /></a><br />
<br style="clear:both"/></p>
<p>More horses!</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2011/01/sjp3.png"><img src="http://www.philbayfield.com/wp-content/uploads/2011/01/sjp3-640x284.png" alt="" title="SJP3" width="640" height="284" class="alignleft size-large wp-image-554" /></a><br />
<br style="clear:both"/></p>
<p>The internet obviously hold Sarah Jessica Parker in quite high regard! <img src='http://www.philbayfield.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2011%2F01%2F25%2Ffunny-google-in-line-search-results%2F&amp;title=Funny%20Google%20in-line%20search%20results" id="wpa2a_10"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2011/01/25/funny-google-in-line-search-results/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ubuntu 10.10 &#8220;Maverick Meerkat&#8221; goes final, download now and avoid the queues!</title>
		<link>http://www.philbayfield.com/2010/10/08/ubuntu-10-10-maverick-meerkat-goes-final-download-now-and-avoid-the-queues/</link>
		<comments>http://www.philbayfield.com/2010/10/08/ubuntu-10-10-maverick-meerkat-goes-final-download-now-and-avoid-the-queues/#comments</comments>
		<pubDate>Fri, 08 Oct 2010 09:12:58 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[meerkat]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=534</guid>
		<description><![CDATA[Last night a base-files update for Ubuntu 10.10-RC went live which removes all the development branding and essentially takes you to the release build. With the last few releases the download rates on release day have been incredibly slow, so avoid the wait and download now. I&#8217;ve been using the development build for around a [...]]]></description>
			<content:encoded><![CDATA[<p>Last night a base-files update for Ubuntu 10.10-RC went live which removes all the development branding and essentially takes you to the release build.</p>
<p>With the last few releases the download rates on release day have been incredibly slow, so avoid the wait and download now.</p>
<p>I&#8217;ve been using the development build for around a month without issue on 1 server and a couple of desktops, it seams solid and stable, worth updating right away.</p>
<p>What&#8217;s new (that I noticed)&#8230;.</p>
<p>For desktop: slightly tweaked UI, Gnome 2.32, brand new software centre which also unifies the .deb installation, probably lots more (see ubuntu.com).</p>
<p>For server: PHP is now version 5.3.3, MySQL updated to 5.1.49, Apache updated to 2.2.16.</p>
<p>For all: Kernel updated to 2.6.35</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2010%2F10%2F08%2Fubuntu-10-10-maverick-meerkat-goes-final-download-now-and-avoid-the-queues%2F&amp;title=Ubuntu%2010.10%20%26%238220%3BMaverick%20Meerkat%26%238221%3B%20goes%20final%2C%20download%20now%20and%20avoid%20the%20queues%21" id="wpa2a_12"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2010/10/08/ubuntu-10-10-maverick-meerkat-goes-final-download-now-and-avoid-the-queues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web server benchmark PHP &#8211; Apache vs Nginx vs Lighttpd</title>
		<link>http://www.philbayfield.com/2010/10/02/web-server-benchmark-php-apache-vs-nginx-vs-lighttpd/</link>
		<comments>http://www.philbayfield.com/2010/10/02/web-server-benchmark-php-apache-vs-nginx-vs-lighttpd/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 15:52:01 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=519</guid>
		<description><![CDATA[This is a quick benchmark of the 3 major *nix web servers, to see which gives the best performance. Test system: Hardware: vps247 cloud VPS node, 512Mb ram. Software: Ubuntu 10.10 RC (kernel 2.6.35-22), Apache 2.2.16 (mod_php), Nginx 0.7.67 (php-fpm), Lighttpd 1.4.26 (php-cgi), PHP 5.3.3 with Xcache. Site: LiteMVC 0.1 Hello World. Test process: Using [...]]]></description>
			<content:encoded><![CDATA[<p>This is a quick benchmark of the 3 major *nix web servers, to see which gives the best performance.</p>
<p><strong>Test system:</strong></p>
<p>Hardware: vps247 cloud VPS node, 512Mb ram.<br />
Software: Ubuntu 10.10 RC (kernel 2.6.35-22), Apache 2.2.16 (mod_php), Nginx 0.7.67 (php-fpm), Lighttpd 1.4.26 (php-cgi), PHP 5.3.3 with Xcache.<br />
Site: LiteMVC 0.1 Hello World.</p>
<p><strong>Test process:</strong></p>
<p>Using ab with 10,000 requests, 10 concurrent requests.<br />
Monitoring load/memory usage with htop.<br />
All web servers with default configuration, 1 site enabled.<br />
All tests were repeated 3 times.</p>
<p><strong>Apache 2.2.16:</strong></p>
<table>
<tr>
<th>Test 1</th>
<th>Test 2</th>
<th>Test 3</th>
</tr>
<tr>
<td>Load at start: 0.03<br />
Memory usage at start: 130 Mb<br />
Load average max: 15.88<br />
Memory usage max: 290 Mb<br />
Requests per second: 400.04<br />
Time per request: 2.5 ms<br />
Longest request: 806 ms</td>
<td>Load at start: 0.07<br />
Memory usage at start: 130 Mb<br />
Load average max: 21.73<br />
Memory usage max: 332 Mb<br />
Requests per second: 395.49<br />
Time per request: 2.529 ms<br />
Longest request: 728 ms</td>
<td>Load at start: 0.06<br />
Memory usage at start: 121 Mb<br />
Load average max: 20.95<br />
Memory usage max: 253 Mb<br />
Requests per second: 385.82<br />
Time per request: 2.592 ms<br />
Longest request: 937 ms</td>
</tr>
</table>
<p><strong>Nginx 0.7.67:</strong></p>
<table>
<tr>
<th>Test 1</th>
<th>Test 2</th>
<th>Test 3</th>
</tr>
<tr>
<td>Load at start: 0.05<br />
Memory usage at start: 129 Mb<br />
Load average max: 0.77<br />
Memory usage max: 157 Mb<br />
Requests per second: 413.40<br />
Time per request: 2.419 ms<br />
Longest request: 239 ms</td>
<td>Load at start: 0.05<br />
Memory usage at start: 152 Mb<br />
Load average max: 0.93<br />
Memory usage max: 169 Mb<br />
Requests per second: 409.15<br />
Time per request: 2.444 ms<br />
Longest request: 232 ms</td>
<td>Load at start: 0.00<br />
Memory usage at start: 163 Mb<br />
Load average max: 0.61<br />
Memory usage max: 169 Mb<br />
Requests per second: 415.28<br />
Time per request: 2.408 ms<br />
Longest request: 250 ms</td>
</tr>
</table>
<p><strong>Lighttpd 1.4.26:</strong></p>
<table>
<tr>
<th>Test 1</th>
<th>Test 2</th>
<th>Test 3</th>
</tr>
<tr>
<td>Load at start: 0.00<br />
Memory usage at start: 115 Mb<br />
Load average max: 0.81<br />
Memory usage max: 139 Mb<br />
Requests per second: 427.92<br />
Time per request: 2.337 ms<br />
Longest request: 120 ms</td>
<td>Load at start: 0.09<br />
Memory usage at start: 136 Mb<br />
Load average max: 0.73<br />
Memory usage max: 143 Mb<br />
Requests per second: 447.10<br />
Time per request: 2.237 ms<br />
Longest request: 111 ms</td>
<td>Load at start: 0.03<br />
Memory usage at start: 140 Mb<br />
Load average max: 0.69<br />
Memory usage max: 159 Mb<br />
Requests per second: 454.13<br />
Time per request: 2.202 ms<br />
Longest request: 178 ms</td>
</tr>
</table>
<p><strong>Conclusions:</strong></p>
<p>Lighttpd was the fastest overall in this test, however what probably stands out the most is the inefficiency of Apache with both server load and memory usage increasing considerably during the test. The reason for this may be down to Apache spawning additional processes when it is receiving a large volume of requests, which results in the higher memory usage. The memory usage with Nginx and Lighttpd increases by a much smaller amount because each of them runs a fixed number of PHP CGI processes (20 in this case).</p>
<p>Apache is definitely the winner in terms of module support and ease of configuration, but I may have a somewhat biased view as I&#8217;ve worked with Apache for years. Nginx is probably the hardest to setup and configure, however after switching from PHP-CGI to PHP-FPM this made things easier and it does seam there are more configuration examples floating around on the net than for Lighttpd. Lighttpd is notorious for memory leaks, I&#8217;m not sure if this is still an issue with current versions.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2010%2F10%2F02%2Fweb-server-benchmark-php-apache-vs-nginx-vs-lighttpd%2F&amp;title=Web%20server%20benchmark%20PHP%20%26%238211%3B%20Apache%20vs%20Nginx%20vs%20Lighttpd" id="wpa2a_14"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2010/10/02/web-server-benchmark-php-apache-vs-nginx-vs-lighttpd/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>First Android app completed.</title>
		<link>http://www.philbayfield.com/2010/09/29/first-android-app-completed/</link>
		<comments>http://www.philbayfield.com/2010/09/29/first-android-app-completed/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 19:52:00 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=497</guid>
		<description><![CDATA[My first Android app has now been completed and is available on the Android Marketplace, it&#8217;s not going to be any use to anyone who is not using the vps247 cloud service, but for anyone is it&#8217;s a very handy app. Here is quick overview of the features available in the app: 1. Resource viewer, [...]]]></description>
			<content:encoded><![CDATA[<p>My first Android app has now been completed and is available on the Android Marketplace, it&#8217;s not going to be any use to anyone who is not using the vps247 cloud service, but for anyone is it&#8217;s a very handy app.</p>
<p>Here is quick overview of the features available in the app:</p>
<p>1. Resource viewer, displays current memory, disk, IP and bandwidth usage:</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-1.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-1-192x320.png" alt="" title="vps247 Manager - Resource Usage" width="192" height="320" class="alignleft size-medium wp-image-498" /></a><br />
<br style="clear:both"/></p>
<p>2. Server viewer, displaying all servers and a traffic light to indicate the server status, servers can be tapped to show detailed information and access start/stop controls:</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-2.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-2-192x320.png" alt="" title="vps247 Manager - Server List" width="192" height="320" class="alignleft size-medium wp-image-501" /></a><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-4.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-4-192x320.png" alt="" title="vps247 Manager - Server Details" width="192" height="320" class="alignleft size-medium wp-image-505" /></a><br />
<br style="clear:both"/></p>
<p>3. IP address viewer:</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-3.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-3-192x320.png" alt="" title="vps247 Manager - IP Addresses" width="192" height="320" class="alignleft size-medium wp-image-506" /></a><br />
<br style="clear:both"/></p>
<p>4. Create new servers, which has a nice interface with sliders and drop downs to make it easy to configure a new server. The available resources are used to dynamically generate the creation interface:</p>
<p><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-5.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-5-192x320.png" alt="" title="vps247 Manager - Create new server" width="192" height="320" class="alignleft size-medium wp-image-509" /></a><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-6.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-6-192x320.png" alt="" title="vps247 Manager - Create completed" width="192" height="320" class="alignleft size-medium wp-image-510" /></a><a href="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-7.png"><img src="http://www.philbayfield.com/wp-content/uploads/2010/09/vps247-Manager-7-192x320.png" alt="" title="vps247 Manager - Server provisioning" width="192" height="320" class="alignleft size-medium wp-image-511" /></a><br />
<br style="clear:both"/></p>
<p>To download the app, just search for &#8216;vps247&#8242; in the Android Marketplace and it should show up!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2010%2F09%2F29%2Ffirst-android-app-completed%2F&amp;title=First%20Android%20app%20completed." id="wpa2a_16"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2010/09/29/first-android-app-completed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Today is a confusing day for 32 bit PHP</title>
		<link>http://www.philbayfield.com/2010/09/23/today-is-a-confusing-day-for-32-bit-php/</link>
		<comments>http://www.philbayfield.com/2010/09/23/today-is-a-confusing-day-for-32-bit-php/#comments</comments>
		<pubDate>Thu, 23 Sep 2010 10:13:49 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=495</guid>
		<description><![CDATA[As many people probable know, there are some glaring inconsistencies between 32 bit and 64 bit PHP, especially when it comes to large numbers and floats. For some reason, best known to the PHP developers, 32 bit PHP is limited to the maximum signed 32 bit integer size of 2147483647, while 64 bit PHP uses [...]]]></description>
			<content:encoded><![CDATA[<p>As many people probable know, there are some glaring inconsistencies between 32 bit and 64 bit PHP, especially when it comes to large numbers and floats.</p>
<p>For some reason, best known to the PHP developers, 32 bit PHP is limited to the maximum signed 32 bit integer size of 2147483647, while 64 bit PHP uses the 64 bit equivalent of 9223372036854775807. Many languages overcome the 32 bit / 64 bit differences by storing 64 bit ints as 2 32 bit ints to allow the usage of 64 bit integers on 32 bit systems, hence providing complete consistency between the two platforms.</p>
<p>These inconsistencies similarly apply to floating point precession, presumably a float in 32 bit PHP is equivalent to a 32 bit float in C, whereas it appears that in 64 bit PHP it&#8217;s actually a double.</p>
<p>Here is a nice example of the inconsistency, today&#8217;s unix timestamp in float form:</p>
<p>32 bit:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">php &gt; echo (float) 1285200000;<br />
1.2852E+9</div></div>
<p>64 bit:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">php &gt; echo (float) 1285200000;<br />
1285200000</div></div>
<p>This is an important thing to remember with PHP, despite the fact it is a loosely typed language, they behaviour is equivalent to the C behaviour for the particular architecture of your server.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2010%2F09%2F23%2Ftoday-is-a-confusing-day-for-32-bit-php%2F&amp;title=Today%20is%20a%20confusing%20day%20for%2032%20bit%20PHP" id="wpa2a_18"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2010/09/23/today-is-a-confusing-day-for-32-bit-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neat trick to beat the sendmail FQDN check</title>
		<link>http://www.philbayfield.com/2010/09/17/neat-trick-to-beat-the-sendmail-fqdn-check/</link>
		<comments>http://www.philbayfield.com/2010/09/17/neat-trick-to-beat-the-sendmail-fqdn-check/#comments</comments>
		<pubDate>Fri, 17 Sep 2010 09:29:05 +0000</pubDate>
		<dc:creator>Phil</dc:creator>
				<category><![CDATA[Servers]]></category>

		<guid isPermaLink="false">http://www.philbayfield.com/?p=492</guid>
		<description><![CDATA[When you install sendmail on a local machine and want to test some mail sending feature of your project, sendmail has a tendency to hang for a couple of minutes each time you try and send mail. Looking in the /var/log/mail.log will reveal it is trying to determine the fully qualified domain name: Sep 16 [...]]]></description>
			<content:encoded><![CDATA[<p>When you install sendmail on a local machine and want to test some mail sending feature of your project, sendmail has a tendency to hang for a couple of minutes each time you try and send mail.</p>
<p>Looking in the /var/log/mail.log will reveal it is trying to determine the fully qualified domain name:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">Sep 16 09:20:01 MyHostName sm-msp-queue[14171]: My unqualified host name (MyHostName) unknown; sleeping for retry<br />
Sep 16 09:21:01 MyHostName sm-msp-queue[14171]: unable to qualify my own domain name (MyHostName) -- using short name</div></div>
<p>Here is a quick fix which resolves the problem:</p>
<p>1. Edit /etc/hosts<br />
2. Change the record for 127.0.0.1 so that it looks something like this</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">127.0.0.1 localhost.localdomain localhost MyHostName</div></div>
<p>3. Restart sendmail</p>
<p>This now makes sendmail think it&#8217;s FQDN is localhost.localdomain, and mail now sends instantly!</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.philbayfield.com%2F2010%2F09%2F17%2Fneat-trick-to-beat-the-sendmail-fqdn-check%2F&amp;title=Neat%20trick%20to%20beat%20the%20sendmail%20FQDN%20check" id="wpa2a_20"><img src="http://www.philbayfield.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.philbayfield.com/2010/09/17/neat-trick-to-beat-the-sendmail-fqdn-check/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

