<?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>Strong as an Ox &#187; web</title>
	<atom:link href="http://www.strongasanox.co.uk/category/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.strongasanox.co.uk</link>
	<description>Ian Oxley - ASP.NET, PHP, JavaScript and Web Applications</description>
	<lastBuildDate>Tue, 24 Aug 2010 22:54:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>How to Fix a Can&#8217;t Create/Write to File Error With SELECT INTO OUTFILE in MySQL</title>
		<link>http://www.strongasanox.co.uk/2010/08/24/how-to-fix-a-cant-create-write-to-file-error-with-select-into-outfile-in-mysql/</link>
		<comments>http://www.strongasanox.co.uk/2010/08/24/how-to-fix-a-cant-create-write-to-file-error-with-select-into-outfile-in-mysql/#comments</comments>
		<pubDate>Tue, 24 Aug 2010 22:42:55 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[mysql]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/08/24/how-to-fix-a-file-permissions-error-with-mysqls-select-into-outfile/</guid>
		<description><![CDATA[Have you ever tried to use SELECT&#8230;INTO OUTFILE in MySQL and come across the following error? &#34;Can&#8217;t create/write to file &#8216;/path/to/folder/filename&#8217; (Errcode: 2)&#34; I was having this problem the other day and, after checking that file permissions weren&#8217;t the cause of the problem, I came across the following post on the MySQL forums: &#34;The problem [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to use <a href="http://dev.mysql.com/doc/refman/5.1/en/select.html"><code>SELECT&hellip;INTO OUTFILE</code></a> in MySQL and come across the following error?</p>
<blockquote>
<p>
		&quot;Can&#8217;t create/write to file &#8216;/path/to/folder/filename&#8217; (Errcode: 2)&quot;
	</p>
</blockquote>
<p>I was having this problem the other day and, after checking that file permissions weren&#8217;t the cause of the problem, I came across the following <a href="http://forums.mysql.com/read.php?20,369583,370808#msg-370808">post on the MySQL forums</a>:</p>
<blockquote cite="http://forums.mysql.com/read.php?20,369583,370808#msg-370808">
<p>
		&quot;The problem was not in MySQL but in AppArmor on Ubuntu. I had to add the directories I wanted to write into to my /etc/apparmor.d/usr.sbin.mysqld and restart apparmor.d.&quot;
	</p>
</blockquote>
<p>So, one <code>sudo vim /etc/apparmor.d/usr.sbin.mysqld</code> later and I&#8217;d added the <code>path/to/folder</code> I needed to be able to write to (not forgetting to add the trailing comma &#8216;,&#8217; to the end of the line, which is <em>always</em> required, even for the last line). </p>
<p>All that was left to do was to restart AppArmor with:</p>
<p><code><br />
$ sudo /etc/init.d/apparmor restart<br />
</code></p>
<p>After that, <code>SELECT&hellip;INTO OUTFILE</code> worked like a charm <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2010/08/24/how-to-fix-a-cant-create-write-to-file-error-with-select-into-outfile-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Greasemonkey Scripts To GitHub</title>
		<link>http://www.strongasanox.co.uk/2010/08/18/moving-greasemonkey-scripts-to-github/</link>
		<comments>http://www.strongasanox.co.uk/2010/08/18/moving-greasemonkey-scripts-to-github/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 21:05:57 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[greasemonkey]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/08/18/moving-greasemonkey-scripts-to-github/</guid>
		<description><![CDATA[Recently I made a few amends to some Greasemonkey scripts I wrote a while back and, since I&#8217;ve been using git quite a bit recently, it made sense to me to move my Greasemonkey scripts onto GitHub. So I did And here they are: google-search-shortcut open-selected-links stackoverflow-tag-cloud straight-to-reader]]></description>
			<content:encoded><![CDATA[<p>Recently I made a few amends to some Greasemonkey scripts I wrote a while back and, since I&#8217;ve been <a href="http://www.strongasanox.co.uk/2010/04/27/using-git/">using git</a> quite a bit recently, it made sense to me to move my Greasemonkey scripts onto GitHub.</p>
<p>So I did <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  And here they are:</p>
<ul>
<li><a href="http://github.com/ianoxley/google-search-shortcut">google-search-shortcut</a></li>
<li><a href="http://github.com/ianoxley/open-selected-links">open-selected-links</a></li>
<li><a href="http://github.com/ianoxley/stackoverflow-tag-cloud">stackoverflow-tag-cloud</a></li>
<li><a href="http://github.com/ianoxley/straight-to-reader">straight-to-reader</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2010/08/18/moving-greasemonkey-scripts-to-github/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Detecting A Drupal Users First Login</title>
		<link>http://www.strongasanox.co.uk/2010/08/05/detecting-a-drupal-users-first-login/</link>
		<comments>http://www.strongasanox.co.uk/2010/08/05/detecting-a-drupal-users-first-login/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 22:43:11 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/2010/08/05/detecting-a-drupal-users-first-login/</guid>
		<description><![CDATA[Being fairly new to Drupal, I was interested to know whether it had anything built in that let you know, or detect, when a user was logging in for the first time e.g. to show them a welcome message. As far as I know, there&#8217;s no method in the API to detect this. However, after [...]]]></description>
			<content:encoded><![CDATA[<p>Being fairly new to Drupal, I was interested to know whether it had anything built in that let you know, or detect, when a user was logging in for the first time e.g. to show them a welcome message.</p>
<p>As far as I know, there&#8217;s no method in the API to detect this. However, after checking the <code>global $user</code> object&#39;s properties to see what we had to play with, it turns out it wasn&#39;t all that tricky:</p>
<ul>
<li>the <code>$global user</code> contains 3 timestamp properties: <code>created</code>, <code>access</code> and <code>login</code></li>
<li>when a user logs in for the first time, all 3 of these timestamps are equal</li>
</ul>
<p>This means we can check whether a user is logging in for the first time with something like this:</p>
<p><code></p>
<pre>
function is_first_time_login($user) {
  return ($user->created == $user->login) &#038;&#038;
         ($user->login == $user->access);
}
	</pre>
<p></code></p>
<p>Now we can call that function where we need to in our elsewhere in our code. For example:</p>
<p><code>
<pre>
function foo() {
  global $user;
  ...
  if (is_first_time_login($user)) {
    drupal_set_message(WELCOME_MSG);
  }
  ...
}
</pre>
<p></code></p>
<p>So far, this approach seems to be working quite well <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2010/08/05/detecting-a-drupal-users-first-login/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Unit Testing in Drupal 6 with PHPUnit</title>
		<link>http://www.strongasanox.co.uk/2010/07/23/setting-up-unit-testing-in-drupal-6-with-phpunit/</link>
		<comments>http://www.strongasanox.co.uk/2010/07/23/setting-up-unit-testing-in-drupal-6-with-phpunit/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 12:34:13 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpunit]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/?p=401</guid>
		<description><![CDATA[I&#8217;ve been using Drupal now for a couple of months, ever since I started my new job, and the other day got my first chance to start writing a custom module. I was keen to use a TDD approach, but wasn&#8217;t sure how well this would play with Drupal. The SimpleTest module looked pretty good [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using Drupal now for a couple of months, ever since I started my <a href="http://www.orangebus.co.uk/">new job</a>, and the other day got my first chance to start writing a custom module.</p>
<p>I was keen to use a TDD approach, but wasn&#8217;t sure how well this would play with Drupal. The <a href="http://drupal.org/project/simpletest">SimpleTest module</a> looked pretty good but in the end I went with <a href="http://www.phpunit.de/">PHPUnit</a>, mainly because I&#8217;d used it before.</p>
<p>After a bit of research I came across a this post explaining how to get PHPUnit set up to play nicely with Drupal 6: <a href="http://kristiannissen.wordpress.com/2009/12/08/drupal-6-phpunit-testing-setup/">http://kristiannissen.wordpress.com/2009/12/08/drupal-6-phpunit-testing-setup/</a></p>
<p>It worked like a charm <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So, just for good measure, I created a project template containing the <code>unittests</code> folder and necessary include files and stuck it on GitHub: <a href="http://github.com/ianoxley/drupal-phpunit-template">http://github.com/ianoxley/drupal-phpunit-template</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2010/07/23/setting-up-unit-testing-in-drupal-6-with-phpunit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Fun with the TARDIS, HTML5 and CSS3</title>
		<link>http://www.strongasanox.co.uk/2010/05/19/some-fun-with-the-tardis-html5-and-css3/</link>
		<comments>http://www.strongasanox.co.uk/2010/05/19/some-fun-with-the-tardis-html5-and-css3/#comments</comments>
		<pubDate>Wed, 19 May 2010 21:54:32 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[doctor who]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/?p=371</guid>
		<description><![CDATA[Just for fun, I thought I would have a play around with some WebKit CSS transitions and the HTML5 &#60;audio&#62; tag to see if I could simulate the TARDIS landing Here&#8217;s what I came up with (currently only works in Safari): TARDIS, HTML5 and CSS3 WebKit Transitions]]></description>
			<content:encoded><![CDATA[<p>Just for fun, I thought I would have a play around with some WebKit CSS transitions and the HTML5 &lt;audio&gt; tag to see if I could simulate the <a href="http://en.wikipedia.org/wiki/TARDIS">TARDIS</a> landing <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here&#8217;s what I came up with (currently only works in Safari): <a href="http://lab.strongasanox.co.uk/tardis.html">TARDIS, HTML5 and CSS3 WebKit Transitions</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2010/05/19/some-fun-with-the-tardis-html5-and-css3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Meta Keywords Tag Does Nothing for your Site&#8217;s Google Rank</title>
		<link>http://www.strongasanox.co.uk/2009/12/18/a-meta-keywords-tag-does-nothing-for-your-sites-google-rank/</link>
		<comments>http://www.strongasanox.co.uk/2009/12/18/a-meta-keywords-tag-does-nothing-for-your-sites-google-rank/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 14:04:37 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/?p=260</guid>
		<description><![CDATA[Are you fed up with so called SEO experts extolling the importance of meta &#8220;keywords&#8221; tags on a site&#8217;s Google rank? Me too. I therefore created doesgoogleusethekeywordsmetatag.com. So the next time anyone moans about their site&#8217;s lack of a keywords meta tag, you know where to send them]]></description>
			<content:encoded><![CDATA[<p>Are you fed up with so called <abbr title="Search Engine Optimisation">SEO</abbr> experts extolling the importance of meta &#8220;keywords&#8221; tags on a site&#8217;s Google rank? Me too. I therefore created <a href="http://doesgoogleusethekeywordsmetatag.com/">doesgoogleusethekeywordsmetatag.com</a>.</p>
<p>So the next time anyone moans about their site&#8217;s lack of a keywords meta tag, you know where to send them <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2009/12/18/a-meta-keywords-tag-does-nothing-for-your-sites-google-rank/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Updating RubyGems on Ubuntu to Install Jekyll</title>
		<link>http://www.strongasanox.co.uk/2009/11/25/updating-rubygems-on-ubuntu-to-install-jekyll/</link>
		<comments>http://www.strongasanox.co.uk/2009/11/25/updating-rubygems-on-ubuntu-to-install-jekyll/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 23:10:05 +0000</pubDate>
		<dc:creator>Ian</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[jekyll]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygems]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.strongasanox.co.uk/?p=242</guid>
		<description><![CDATA[Having recently read about Jekyll I decided to boot up Ubuntu, install all the bits and pieces and give it a try. However, I fell at the first hurdle when greeted by the following error: Error installing gemcutter: gemcutter requires RubyGems version &#62;= 1.3.5 The Synaptic Package Manager reported everything as being up-to-date but only [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently <a href="http://articles.sitepoint.com/article/jekyll-sites-made-simple">read about Jekyll</a> I decided to boot up Ubuntu, install all the bits and pieces and give it a try. However, I fell at the first hurdle when greeted by the following error:</p>
<blockquote>
<div>Error installing gemcutter:<br />
gemcutter requires RubyGems version &gt;= 1.3.5</div>
</blockquote>
<p>The Synaptic Package Manager reported everything as being <em>up-to-date</em> but only to version 1.3.1. As it turns out, there is another way to <a href="http://rudygems.com/post/164224985/update-rubygems-on-ubuntu">update rubygems on Ubuntu</a>, which worked a treat! The rest of the installation was a breeze <img src='http://www.strongasanox.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>If you are interested more info on Jekyll can be found on <a href="http://github.com/mojombo/jekyll">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.strongasanox.co.uk/2009/11/25/updating-rubygems-on-ubuntu-to-install-jekyll/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
