<?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>Simon Whatley &#187; Rob Douglas</title>
	<atom:link href="http://www.simonwhatley.co.uk/tag/rob-douglas/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Wed, 02 Nov 2011 09:28:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Talking QR.app at Barcamp Brighton 3</title>
		<link>http://www.simonwhatley.co.uk/talking-qrapp-at-barcamp-brighton-3</link>
		<comments>http://www.simonwhatley.co.uk/talking-qrapp-at-barcamp-brighton-3#comments</comments>
		<pubDate>Thu, 11 Sep 2008 09:12:37 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[1d]]></category>
		<category><![CDATA[2d]]></category>
		<category><![CDATA[Aral Balkan]]></category>
		<category><![CDATA[Barcamp]]></category>
		<category><![CDATA[barcodes]]></category>
		<category><![CDATA[Brighton]]></category>
		<category><![CDATA[camera]]></category>
		<category><![CDATA[datamatrix]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Jeremy Keith]]></category>
		<category><![CDATA[Jerome Ribot]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[Mark Wudden]]></category>
		<category><![CDATA[maxicode]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[mobile tagging]]></category>
		<category><![CDATA[open source technologies]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[QRcode]]></category>
		<category><![CDATA[Rob Douglas]]></category>
		<category><![CDATA[social protocols]]></category>
		<category><![CDATA[Tantek Celik]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web-gliterati]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=1113</guid>
		<description><![CDATA[Last weekend I attended Barcamp Brighton 3. For the uninitiated like me, a BarCamp is an international network of user generated conferences — open, participatory workshop-events, whose content is provided by participants — often focusing on early-stage web applications, and related open source technologies, social protocols, and open data formats.]]></description>
			<content:encoded><![CDATA[<p>Last weekend I attended <a href="http://barcampbrighton.org/" title="Barcamp Brighton" target="_blank" rel="nofollow">Barcamp Brighton 3</a>. For the uninitiated like me, a BarCamp is an international network of user generated conferences &#8212; open, participatory workshop-events, whose content is provided by participants &#8212; often focusing on early-stage web applications, and related open source technologies, social protocols, and open data formats.</p>
<p>Barcamp Brighton was a great event, attended by some of the web-gliterati: <a href="http://adactio.com/" title="Adactio: Jeremy Keith" target="_blank" rel="nofollow">Jeremy Keith</a>, <a href="http://aralbalkan.com/" title="Aral Balkan" target="_blank" rel="nofollow">Aral Balkan</a>, <a href="http://tantek.com/" title="Tantek Celik" target="_blank" rel="nofollow">Tantek Celik</a>, <a href="http://ribot.co.uk/" title="Jerome Ribot" target="_blank" rel="nofollow">Jerome Ribot</a> and <a href="http://supercollider.dk/" title="Mark Wudden" target="_blank" rel="nofollow">Mark Wudden</a> to name but five I was lucky to converse with. That&#8217;s not to say the other attendees were any less significant. It was everyone who made the event great.</p>
<p>As you may have observed from the title of this post, I presented a talk, along with my good friend <a href="http://www.anucreative.com" title="anu.creative's website" target="_blank" rel="nofollow">Rob Douglas</a>, titled <q>Talking QR.app</q>.</p>
<p>The presentation can be viewed below, or via the <a href="http://app.sliderocket.com/app/FullPlayer.aspx?id=EB6F5301-5A9F-7AAD-9EEE-39BFA2524847" title="Talking QR.app presentation">SlideRocket website</a>.</p>
<p><embed src="http://data.sliderocket.com/SlideRocketPlayer.swf" flashvars="id=EB6F5301-5A9F-7AAD-9EEE-39BFA2524847" width="400" height="300" allowFullScreen="true" type="application/x-shockwave-flash"></embed></p>
<p>I have also bookmarked a number of <a href="http://delicious.com/whatterz/qrcode" title="QR-code bookmarks" target="_blank" rel="nofollow">QR-code links</a> on Delicious.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/talking-qrapp-at-barcamp-brighton-3/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Parsing Twitter Usernames, Hashtags and URLs with JavaScript</title>
		<link>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-javascript</link>
		<comments>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-javascript#comments</comments>
		<pubDate>Mon, 21 Jul 2008 15:10:48 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[New Brunswick]]></category>
		<category><![CDATA[online musings]]></category>
		<category><![CDATA[online resource]]></category>
		<category><![CDATA[parseURL]]></category>
		<category><![CDATA[parsing]]></category>
		<category><![CDATA[Rob Douglas]]></category>
		<category><![CDATA[Simon Whatley]]></category>
		<category><![CDATA[tag]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=646</guid>
		<description><![CDATA[As part of an AIR project that I have been working on with my good friend Rob, we came across the need to parse a number of URLs within the text of a Twitter post. This may not sound too easy at first, but thanks to the prototype property available on JavaScript objects, our task was a relatively simple one.]]></description>
			<content:encoded><![CDATA[<p><strong>Updated 10/05/2011</strong></p>
<p>As part of an <acronym title="Adobe Integrated Runtime">AIR</acronym> project that I have been working on with my good friend <a href="http://www.anucreative.com" title="Rob Douglas" target="_blank" rel="nofollow">Rob</a>, we came across the need to parse a number of <abbr title="Universal Resource Locator">URL</abbr>s within the text of a <a href="http://twitter.com" title="Twitter" target="_blank" rel="nofollow">Twitter</a> post. This may not sound too easy at first, but thanks to the prototype property available on JavaScript objects, our task was a relatively simple one.</p>
<p>The prototype object of JavaScript is a pre-built object that simplifies the process of adding custom properties or methods to all instances of an object. For example, there is not a <code>trim()</code> method available on the <code>String</code> class, therefore, through the wizardry of regular expressions and the prototype property, I can add one.</p>
<p>You simply need to specify <code>String.prototype</code> before your method definition. e.g.:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">trim</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/^\s+|\s+$/g</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>With this in mind, we can add methods to our <code>String</code> class, at runtime, that will allow us to manipulate the text string that is passed back in a Twitter <acronym title="JavaScript Object Notation">JSON</acronym> packet.</p>
<h3>The Goal</h3>
<p>To auto-magically parse different types of links within a text string. We will look at standard <abbr title="Universal Resource Locator">URL</abbr> links, links applied to <a href="http://twitter.com" title="Twitter" target="_blank" rel="nofollow">Twitter</a> usernames and those applied to <a href="http://twitter.pbwiki.com/Hashtags" title="Twitter Hashtags" target="_blank" rel="nofollow">Hashtags</a>.</p>
<h3>Demo</h3>
<p>The demonstration simply takes a test string and outputs it to the screen using JavaScript.</p>
<p><a href="http://www.simonwhatley.co.uk/examples/twitter/prototype/">See the demo in action.</a></p>
<h3>Parsing URLs as Links to the resource</h3>
<p>First we create a custom method of the <code>String.prototype</code> property called <code>parseURL</code>. When invoked on a string, the regular expression finds any instance of a <abbr title="Universal Resource Locator">URL</abbr> and will wrap the <abbr title="Universal Resource Locator">URL</abbr> with an <abbr title="HyperText Markup Language">HTML</abbr> anchor, with the correct <code>href</code> attribute and value applied.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">parseURL</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/[A-Za-z]+:\/\/[A-Za-z0-9-_]+\.[A-Za-z0-9-_:%&amp;~\?\/.=]+/g</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> url.<span style="color: #660066;">link</span><span style="color: #009900;">&#40;</span>url<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Demo 1.</strong></p>
<p>We can simply demonstrate the parsing of the link with the following code in the body of the page:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
var test = &quot;Simon Whatley's online musings can be found at: http://www.simonwhatley.co.uk&quot;;
document.write(test.parseURL());
&lt;/script&gt;</pre></div></div>

<p>In the above example, a simple string variable is created called <code>test</code>, which contains a <abbr title="Universal Resource Locator">URL</abbr>. The text does not contain any <abbr title="HyperText Markup Language">HTML</abbr> at this stage. We then write out the <code>test</code> variable applying the <code>parseURL()</code> method to it.</p>
<p>The resultant <abbr title="HyperText Markup Language">HTML</abbr> generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Simon Whatley's online musings can be found at: &lt;a href=&quot;http://www.simonwhatley.co.uk&quot;&gt;http://www.simonwhatley.co.uk&lt;/a&gt;</pre></div></div>

<p>When rendered in a browser, the code becomes a hyper-link.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Parsing Usernames as Links to Twitter</h3>
<p>Following on from the <abbr title="Universal Resource Locator">URL</abbr> example above, we can apply a similar methodology to Twitter usernames since they can also be <abbr title="Universal Resource Locator">URL</abbr>s to their associated Twitter page.</p>
<p>Again we create a custom method of the <code>String.prototype</code> property, this time we&#8217;ll called it <code>parseUser</code>. The regular expression in this case finds all instances of <code>@username</code>. We then simply replace the <code>@</code> as this is not part of the actual username. The Twitter <abbr title="Universal Resource Locator">URL</abbr> is then applied to the username.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">parseUsername</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/[@]+[A-Za-z0-9-_]+/g</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>u<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> username <span style="color: #339933;">=</span> u.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;@&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000066; font-weight: bold;">return</span> u.<span style="color: #660066;">link</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://twitter.com/&quot;</span><span style="color: #339933;">+</span>username<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Demo 2.</strong></p>
<p>We can simply demonstrate this with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
var test = &quot;@whatterz is writing a post about JavaScript.&quot;;
document.writeln(test.parseUsername());
&lt;/script&gt;</pre></div></div>

<p>The resultant <abbr title="HyperText Markup Language">HTML</abbr> generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;a href=&quot;http://twitter.com/whatterz&quot;&gt;@whatterz&lt;/a&gt; is writing a post about JavaScript</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Parsing Hashtags as Links to Twitter&#8217;s Search</h3>
<p>Finally, Twitter also allows user&#8217;s to create Hastags within their posts. Hashtags are a community-driven convention for adding additional context and metadata to your tweets. Like regular <abbr title="Universal Resource Locator">URL</abbr>s and usernames, Hastags can been parsed as a <abbr title="Universal Resource Locator">URL</abbr> to an online resource, in this case, Twitter&#8217;s search.</p>
<p>Again we create a custom method of the <code>String.prototype</code> property, this time we&#8217;ll called it <code>parseHashtag</code>. The regular expression in this case finds all instances of <code>#hashtag</code>. The Twitter Search <abbr title="Universal Resource Locator">URL</abbr> is then applied to the hashtag.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">String.<span style="color: #660066;">prototype</span>.<span style="color: #660066;">parseHashtag</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #009966; font-style: italic;">/[#]+[A-Za-z0-9-_]+/g</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #003366; font-weight: bold;">var</span> tag <span style="color: #339933;">=</span> t.<span style="color: #660066;">replace</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;#&quot;</span><span style="color: #339933;">,</span><span style="color: #3366CC;">&quot;%23&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #000066; font-weight: bold;">return</span> t.<span style="color: #660066;">link</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;http://search.twitter.com/search?q=&quot;</span><span style="color: #339933;">+</span>tag<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p><strong>Demo 3.</strong></p>
<p>We can simply demonstrate this with the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
var test = &quot;Simon is writing a post about #twitter and parsing hashtags as URLs&quot;;
document.writeln(test.parseHashtag());
&lt;/script&gt;</pre></div></div>

<p>The resultant <abbr title="HyperText Markup Language">HTML</abbr> generated is the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">Simon is writing a post about &lt;a href=&quot;http://search.twitter.com/search?q=%23twitter&quot;&gt;#twitter&lt;/a&gt; and parsing hashtags as URLs</pre></div></div>

<p>NB. Twitter&#8217;s search was originally provided by Summize. However, as of July 2008, they have been bought by Twitter and the search can be found at <a href="http://search.twitter.com" title="Twitter Search" target="_blank" rel="nofollow">http://search.twitter.com</a>.</p>
<h3>Where to take it next</h3>
<p>Using the above code, we can now create a simple Twitter feed reader. Using, for example jQuery, to get and parse the Twitter <acronym title="JavaScript Object Notation">JSON</acronym> packet we can then apply the prototype methods to the text entries.</p>
<p>It is also worth noting that it is possible to cascade the methods, so we can do the following:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;script type=&quot;text/javascript&quot;&gt;
var test = &quot;@whatterz is writing a blog post about #twitter, which can be found at http://www.simonwhatley.co.uk&quot;;
document.writeln(test.parseURL().parseUsername().parseHashtag());
&lt;/script&gt;</pre></div></div>

<h3>Download the code</h3>
<p>The <a href="http://www.simonwhatley.co.uk/examples/twitter/prototype/">example code</a> can be downloaded from the demo page.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/parsing-twitter-usernames-hashtags-and-urls-with-javascript/feed</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>PHP.ini Permission Problems on Windows Vista</title>
		<link>http://www.simonwhatley.co.uk/phpini-permission-problems-on-windows-vista</link>
		<comments>http://www.simonwhatley.co.uk/phpini-permission-problems-on-windows-vista#comments</comments>
		<pubDate>Sun, 17 Feb 2008 22:28:41 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[administrator]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[configuring]]></category>
		<category><![CDATA[difficulties]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Microsoft Vista]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[paths]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[problems]]></category>
		<category><![CDATA[Rob Douglas]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[solutions]]></category>
		<category><![CDATA[solving]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows Vista]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=398</guid>
		<description><![CDATA[Installing PHP is a relatively simple task one would think. Indeed it is simple, but configuring the php.ini isn't; at least not so on Windows Vista! It is infuriating when such a relatively simple task is made inordinately complicated because of the nuances of Vista permissions. What started out as a 5 minute task took a significant number of hours searching for a suitable answer on Google, and not only by myself.]]></description>
			<content:encoded><![CDATA[<p>Installing PHP is a relatively simple task one would think. Indeed it is simple, but configuring the php.ini isn&#8217;t; at least not so on Windows Vista! It is infuriating when such a relatively simple task is made inordinately complicated because of the nuances of Vista permissions. What started out as a 5 minute task took a significant number of hours searching for a suitable answer on Google, and not only by myself.</p>
<p>The task I was trying to achieve was the installation of development versions of <a href="http://wordpress.org" title="WordPress" rel="nofollow">WordPress</a>, <a href="http://drupal.org" title="Drupal" rel="nofollow">Drupal</a>, <a href="http://www.mediawiki.org" title="MediaWiki" rel="nofollow">MediaWiki</a> and <a href="http://moodle.org" title="Moodle" rel="nofollow">Moodle</a>, all of which would require a MySQL database. Trying to load the MySQL extension should have been a simple case of uncommenting the line in the php.ini and restarting the Apache service. With Vista, this was certainly not the case.</p>
<p>I set up a very simple page detailing the <acronym title="PHP: Hypertext Preprocessor">php</acronym> configuration in an index.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span> ?php <span style="color: #990000;">phpinfo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>This showed me the default configuration path of my php.ini and extensions directory, amongst a whole host of other information.</p>
<p>In both cases the paths were incorrect. First and foremost the configuration file path stated <code>C:\Windows</code> when in fact I had installed it in the root (<code>C:\PHP5</code>). So, although I was amending the php.ini file with the correct detail, Vista was using the default values. If there is no php.ini file in Windows, then you&#8217;ll continue banging your head against a brick wall.</p>
<p>The problems didn&#8217;t stop there. Moving the php.ini file to the Windows directory under Vista isn&#8217;t a simple copy and paste task. You need to be administrator. But Vista&#8217;s administrator priviledges are more pseudo than actual! In order to amend and save the php.ini file in the Windows directory, you must run Notepad as administrator and save the file as such. Voila! Everything then works. The <code>phpinfo()</code> function returned the correct installation detail and I could continue with the job I was meant to be doing.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>PS. Thanks to <a href="http://www.anucreative.com" title="Rob Douglas" rel="nofollow">Rob Douglas</a> for his help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/phpini-permission-problems-on-windows-vista/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

