<?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>rickogden.com</title>
	<atom:link href="http://www.rickogden.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rickogden.com</link>
	<description></description>
	<lastBuildDate>Mon, 13 Jun 2011 10:09:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>When Objects Act Like Arrays</title>
		<link>http://www.rickogden.com/2011/06/when-objects-act-like-arrays/</link>
		<comments>http://www.rickogden.com/2011/06/when-objects-act-like-arrays/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 10:09:11 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[object orientation]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=433</guid>
		<description><![CDATA[I&#8217;m a big advocate of object-oriented programming, even though only a few years ago I hated it and thought it was &#8220;over engineering&#8221;. I don&#8217;t believe, however, that object orientation is suitable for every circumstance. Anyway, that&#8217;s for another blog post. Objects are great, but not always the best when handling data, particularly things like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a big advocate of object-oriented programming, even though only a few years ago I hated it and thought it was &#8220;over engineering&#8221;. I don&#8217;t believe, however, that object orientation is suitable for every circumstance. Anyway, that&#8217;s for another blog post. Objects are great, but not always the best when handling data, particularly things like data collections.</p>
<p>One of the nice things about storing collections of data in arrays rather than objects is the fact that you&#8217;re able to easily loop through the collection, and extract data from the collection depending on the position. Sometimes though we may want to manipulate the collection, and store more information than just the data in the collection. This is where SPL comes in.</p>
<p>As of version 5.0 PHP has included the <a href="http://php.net/manual/en/book.spl.php" target="_blank">SPL</a> (Standard PHP Library). I am going to look at a couple of interfaces from this library in this blog post: <a href="http://php.net/manual/en/class.arrayaccess.php" target="_blank">ArrayAccess</a> and <a href="http://php.net/manual/en/class.seekableiterator.php" target="_blank">SeekableIterator</a>. These interfaces allow us to do a couple of things: SeekableIterator allows us to iterate through the object (eg. a foreach() loop), and the ArrayAccess allows us to extract data from the object as if it was an array. All this in a way that is completely controlled by the programmer.</p>
<p>Definition for the SeekableIterator:</p>
<pre class="brush: php; light: true; title: ; notranslate">
SeekableIterator extends Iterator {
/* Methods */
abstract public void seek ( int $position )

/* Inherited methods */
abstract public mixed Iterator::current ( void )
abstract public scalar Iterator::key ( void )
abstract public void Iterator::next ( void )
abstract public void Iterator::rewind ( void )
abstract public boolean Iterator::valid ( void )
}
</pre>
<p>Definition for the ArrayAccess:</p>
<pre class="brush: php; light: true; title: ; notranslate">
ArrayAccess {
/* Methods */
abstract public boolean offsetExists ( mixed $offset )
abstract public mixed offsetGet ( mixed $offset )
abstract public void offsetSet ( mixed $offset , mixed $value )
abstract public void offsetUnset ( mixed $offset )
}
</pre>
<p>The way these work is that they require a variety of methods to appear in the class. With SeekableIterator there is generally a &#8220;position&#8221; property which is just an integer holding the current position in the collection (so normally defaults to 0). The methods that are required are: seek, current, key, next, rewind and valid. The &#8220;seek&#8221; moves the position to the number passed in as an argument, &#8220;next&#8221; method normally increments the position by one, and &#8220;rewind&#8221; resets the position back to 0. &#8220;current&#8221; returns the item at which the position property is at, &#8220;key&#8221; tells you the current value of position and &#8220;valid&#8221; checks to make sure an item exists at that position. You can then put the object in a foreach loop as if it was an array!</p>
<pre class="brush: php; light: true; title: ; notranslate">
foreach($iterableObject as $item {
     ...
}</pre>
<p>ArrayAccess requires fewer methods, and some of them are similar: &#8220;offsetExists&#8221; is the same as &#8220;valid&#8221; but rather than getting the position from the internal position property, it is passed in as a parameter. &#8220;offsetGet&#8221; returns the item at a given position and &#8220;offsetSet&#8221; sets an item to a given value. You can then treat an object like an array by using standard array notation:</p>
<pre class="brush: php; light: true; title: ; notranslate">
$item = $arrayAccessObject[0];
</pre>
<p>A single class can implement both of these interfaces without conflict, and SPL contains many more things like this. I have not written this as a tutorial as the PHP Docs are incredibly good on this subject and easy to follow.</p>
<p><a href="http://php.net/manual/en/class.seekableiterator.php" target="_blank">http://php.net/manual/en/class.seekableiterator.php</a><br />
<a href="http://php.net/manual/en/class.arrayaccess.php" target="_blank">http://php.net/manual/en/class.arrayaccess.php</a><br />
<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2011/06/when-objects-act-like-arrays/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installation of Memcache in PHP on Ubuntu/Debian</title>
		<link>http://www.rickogden.com/2011/01/installation-of-memcache-in-php-on-ubuntudebian/</link>
		<comments>http://www.rickogden.com/2011/01/installation-of-memcache-in-php-on-ubuntudebian/#comments</comments>
		<pubDate>Fri, 14 Jan 2011 14:20:09 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[memcache]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=422</guid>
		<description><![CDATA[Happy new year all! Just a quick post about how to install Memcache in PHP on an Ubuntu or Debian server (I think it will apply to Redhat based servers, just substitute the apt-get for yum). Log on to your server as root (either directly or using sudo su), then install the Memcache daemon through [...]]]></description>
			<content:encoded><![CDATA[<p>Happy new year all! Just a quick post about how to install Memcache in PHP on an Ubuntu or Debian server (I think it will apply to Redhat based servers, just substitute the apt-get for yum).</p>
<p>Log on to your server as root (either directly or using sudo su), then install the Memcache daemon through apt:</p>
<pre class="brush: bash; light: true; title: ; notranslate">apt-get install memcached</pre>
<p>Once installed you need to install the Memcache module into PHP. This is done through <a href="http://pecl.php.net/" target="_blank">PECL</a> which in turn is installed through <a href="http://pear.php.net/" target="_blank">PEAR</a>. When they are both installed, you need to run the command:</p>
<pre class="brush: bash; light: true; title: ; notranslate">pecl install memcache</pre>
<p>This will install the memcache extension, and once done will tell you to add the the line &#8220;extension=memcache.so&#8221; into your php.ini file. I prefer keeping these in separate files (so that the php.ini file can be updated). The easy way to do this is:</p>
<pre class="brush: bash; light: true; title: ; notranslate">echo &quot;extension=memcache.so&quot; &gt; /etc/php5/conf.d/memcache.ini</pre>
<p>And finally, reload Apache</p>
<pre class="brush: bash; light: true; title: ; notranslate">/etc/init.d/apache2 reload</pre>
<p>If successful, Memcache will now appear in your phpinfo().<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2011/01/installation-of-memcache-in-php-on-ubuntudebian/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>5 Cool Things in HTML 5 for Mobile Web App Development</title>
		<link>http://www.rickogden.com/2010/12/5-cool-things-in-html-5-for-mobile-web-app-development/</link>
		<comments>http://www.rickogden.com/2010/12/5-cool-things-in-html-5-for-mobile-web-app-development/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 13:26:07 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[mobile applications]]></category>
		<category><![CDATA[web applications]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=406</guid>
		<description><![CDATA[Following on from my previous HTML 5 article, I decided to write another one talking about a few cool things that HTML 5 brings us which help us develop cross-platform web applications. Although not all devices support HTML 5 at the moment, it is increasingly becoming the standard due to its relatively low resource consumption [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from my previous HTML 5 article, I decided to write another one talking about a few cool things that HTML 5 brings us which help us develop cross-platform web applications. Although not all devices support HTML 5 at the moment, it is increasingly becoming the standard due to its relatively low resource consumption and accessibility.</p>
<h4>Canvas</h4>
<p>Canvas is pretty much what it says on the tin, it is an element which can be used by JavaScript draw draw graphics on-the-fly. These graphics can range from static graphics (such as graphs), to animations all the way through to fully rendered 3D images using WebGL. The idea of canvas is that it&#8217;s a blank canvas for you to work with.</p>
<p><a href="https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas" target="_blank">https://developer.mozilla.org/en/Drawing_Graphics_with_Canvas</a></p>
<h4>Audio/Video</h4>
<p>HTML 5 introduces the audio and video elements. These elements are used to embed audio and video content into your website. As these are raw media files (unlike Flash which includes its own player), it relies on the web browser to be able to decode and control the content. Standard still has not been agreed upon, with some browser developers wanting to use Ogg (the open standard), and others wanting to use h.264. This currently makes it difficult for developers, so while we&#8217;re waiting for a clear victor, it&#8217;s probably best that we include both!</p>
<p><a href="https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox" target="_blank">https://developer.mozilla.org/En/Using_audio_and_video_in_Firefox</a></p>
<h4>Offline Caching</h4>
<p>The problem with web applications is that they require a continuous internet connection. This can become even more problematic when using mobile devices, as there may be no guarantee of coverage (particularly if the user is on the move). HTML 5 solves this problem by using offline caching. Using manifesto files you can tell a browser what files it should cache, what files require an internet connection (ie. shouldn&#8217;t be cached) and a fallback if content is not available. This can also be used to reduce the need to communicate back to the server continually, thus saving you, and the user precious bandwidth.</p>
<p><a href="http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/" target="_blank">http://www.webreference.com/authoring/languages/html/HTML5-Application-Caching/</a></p>
<h4>Client-side Storage</h4>
<p>We are used to cookies being used to store data on the client, but they are rather inflexible. This is sorted with the use of client-side storage. There are a few different types of this: Session storage will store data associated with a particular instance of a website. What this means is that the data is persistent as you navigate through a website, but if you open up another instance of the website (such as in another tab or window), then the session is different. This means you can have different data stored with different instances.</p>
<p>Local storage is more like cookies, however unlike cookies the data is not sent to the server in every HTTP request, it is only retrieved as and when needed. This means that data isn&#8217;t unnecessarily sent to the server allowing you to store more data and save bandwidth. The data persists when the window is closed and (unlike session storage) can be accessed across all tabs/windows. The data is associated with the domain.</p>
<p>If you are wanting to store more complex data and be able to search through it easily, you&#8217;re able to use a database store. This uses the SQLite spec, and means you&#8217;re able to query the database file and retrieve only relevant information to be processed or sent back to the server.</p>
<p><a href="http://www.webreference.com/authoring/languages/html/HTML5-Client-Side/" target="_blank">http://www.webreference.com/authoring/languages/html/HTML5-Client-Side/</a></p>
<h4>Geolocation</h4>
<p>One of the big things about Smartphones and mobile applications is that they can determine the location of the user, and therefore bring up information relevant to the location. This was done differently by each device and required direct access to the OS API. HTML 5 has standardised the methodology to retrieve the location, and does it by whatever means the device can handle (eg. Wi-Fi networks if the device has a wireless card but no GPS). As this is implemented by the browser, there is no need to (as developers) worry about how the location is retrieved.</p>
<p><a href="http://diveintohtml5.org/geolocation.html" target="_blank">http://diveintohtml5.org/geolocation.html</a><!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/12/5-cool-things-in-html-5-for-mobile-web-app-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML 5 Preparation</title>
		<link>http://www.rickogden.com/2010/11/html5-prep/</link>
		<comments>http://www.rickogden.com/2010/11/html5-prep/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 08:43:47 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=402</guid>
		<description><![CDATA[When setting up an HTML 5 web page, there are a couple of things which need to be done. First of all you need to standardise the CSS for the new HTML 5 elements. This can be done at the top of your CSS stylesheet by making all the new elements be displayed as &#8220;block&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>When setting up an HTML 5 web page, there are a couple of things which need to be done. First of all you need to standardise the CSS for the new HTML 5 elements. This can be done at the top of your CSS stylesheet by making all the new elements be displayed as &#8220;block&#8221; elements:</p>
<pre class="brush: css; title: ; notranslate">article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section,summary{
  display: block;
}
</pre>
<p>Unfortunately there is still a range of browsers which still don&#8217;t render HTML 5 objects. This means we need to add a JavaScript hack. Rather than downloading or creating your own JavaScript file, you may as well just link to a file that has already been created for you on Google Code. This means that it will always be kept up to date. Also as it is only needed for IE browsers up to version 8, you won&#8217;t need other browsers to load it:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--[if lt IE 9]&gt;
&lt;script src=&quot;http://html5shiv.googlecode.com/svn/trunk/html5.js&quot;&gt;&lt;/script&gt;
&lt;![endif]--&gt;
</pre>
<p>You are then free to start creating your HTML 5 web page!<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/11/html5-prep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Research Overview</title>
		<link>http://www.rickogden.com/2010/11/research-overview/</link>
		<comments>http://www.rickogden.com/2010/11/research-overview/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 09:23:14 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[location-based social media]]></category>
		<category><![CDATA[masters]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=398</guid>
		<description><![CDATA[I have put up a page about my MSc (by Research) which I am currently working on. I am researching into development of an open, flexible location based social media application.]]></description>
			<content:encoded><![CDATA[<p>I have <a href="http://www.rickogden.com/labs/location-based-social-media-concept/">put up a page</a> about my MSc (by Research) which I am currently working on. I am researching into development of an open, flexible location based social media application.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/11/research-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHPNW10 &#8211; An Overview</title>
		<link>http://www.rickogden.com/2010/10/phpnw10-an-overview/</link>
		<comments>http://www.rickogden.com/2010/10/phpnw10-an-overview/#comments</comments>
		<pubDate>Tue, 19 Oct 2010 07:48:25 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpnw]]></category>
		<category><![CDATA[phpnw10]]></category>
		<category><![CDATA[zend framework]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=379</guid>
		<description><![CDATA[I had a fantastic time at phpnw10 this year. Met loads of old friends, and made a few new ones. The main conference kicked off on Saturday morning with a keynote by Lorna Mitchell entitled &#8220;Teach a man to fish&#8221;. This was about how team training is important with proper feedback mechanisms which enable a [...]]]></description>
			<content:encoded><![CDATA[<p>I had a fantastic time at phpnw10 this year. Met loads of old friends, and made a few new ones. The main conference kicked off on Saturday morning with a keynote by <a href="http://www.lornajane.net" target="_blank">Lorna Mitchell</a> entitled &#8220;Teach a man to fish&#8221;. This was about how team training is important with proper feedback mechanisms which enable a developer (and a team) to learn from their work and give them the skills to teach themselves further. Following that I went to see <a href="http://derickrethans.nl/" target="_blank">Derick Rethans</a> giving a talk on geolocation within PHP. This gave me a great insight into how geolocation/mapping works online and has given me some food for thought for my MSc. After, I headed back to the main track to see <a href="http://phpir.com/" target="_blank">Ian Barber</a> speaking about debugging. I find that this is the sort of talk I can&#8217;t get enough of, and discovered a couple of cool new tools to help with debugging on top of the existing ones I already use.</p>
<p>After lunch I saw <a href="http://www.dragonbe.com/" target="_blank">Michelangelo Van Dam</a> talking about unit testing within ZF. Like everything with ZF, it seemed a lot easier than I thought it might be. Then there was another ZF talk in the same room by <a href="http://merewood.org/" target="_blank">Rowan Merewood</a> who, as always, gave a rather entertaining talk. It was about Zend_Acl and used real-world examples (ship classes from Star Trek) to demonstrate how they work.</p>
<p><a href="http://www.macvicar.net/" target="_blank">Scott MacVicar</a> gave a really interesting talk on HipHop for PHP, allowing PHP code to be compiled. He went through the process of using it, what the current limitations are and the plans for the future. As this was Scott, heckling was aplenty, and made this talk very enjoyable! Then it was back to the main track for the final session: The Framework Shootout, a panel session chaired by <a href="http://deglos.com/" target="_blank">Marcus Deglos</a>. Although there were no definitive conclusions that came out from the panel, it was very interesting to see different people&#8217;s take on things, and the strengths and weaknesses of a variety of frameworks.</p>
<p>Overall it was an excellent event with excellent attendance! However we have a bit of a dilemma now. We have reached the capacity of this venue. This means that if we want to expand we will need to find a new one. If you have any thoughts/ideas/recommendations on not only venues around Manchester, but how we can expand further to increase the impact of the PHPNW group, please let me know! Finally I would like to thank <a href="http://www.magmadigital.co.uk/" target="_blank">Jeremy Coates</a> and all the helpers on the day, the event ran fantastically smoothly and it was all down to you, thanks everyone!<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/10/phpnw10-an-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Students Should Attend PHPNW10</title>
		<link>http://www.rickogden.com/2010/08/why-students-should-attend-phpnw10/</link>
		<comments>http://www.rickogden.com/2010/08/why-students-should-attend-phpnw10/#comments</comments>
		<pubDate>Mon, 02 Aug 2010 12:08:59 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[phpnw]]></category>
		<category><![CDATA[phpnw10]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=359</guid>
		<description><![CDATA[PHPNW is primarily a conference aimed at professionals within the industry to allow them to learn from each other and discover new ideas and techniques which they can then apply to their every day work. What is less prominent is how this is equally as useful for students, who may want to work in this [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://conference.phpnw.org.uk" target="_blank">PHPNW</a> is primarily a conference aimed at professionals within the industry to allow them to learn from each other and discover new ideas and techniques which they can then apply to their every day work. What is less prominent is how this is equally as useful for students, who may want to work in this same area once they have graduated.</p>
<p><span id="more-359"></span></p>
<h3>Why should I spend £38 of my student loan on this?!</h3>
<p>There is the saying &#8220;it&#8217;s not what you know, it&#8217;s who you know&#8221;. This is not strictly true, however there are definitely elements of truth in this saying. At university you learn a lot about a wide range of things around your subject. This is very important in order to gain a well-rounded education (see my Breadth vs Depth article) but if you know the area you want to go into once you graduate chances are you&#8217;ll want to gain more specific knowledge.</p>
<p>Professional conferences will give you insight into what people are doing in the professional world. As a student you are often isolated within a bubble. This bubble contains the information you need to gain good marks on your exams/coursework, but does not necessarily reflect what is happening in the profession. This is your chance to learn from people in that profession. Use their experience to give you guidance and an insight into what you may end up doing yourself.</p>
<p>Conferences are not just a load of lectures happening. A lot of what&#8217;s important (and indeed a lot of what you learn) takes place in the breaks, meals and of course &#8211; in the bar! Through having conversations with other delegates you can get even more insight into what it&#8217;s like to work in this industry and also will allow you to get to know people in the industry. This is where you can pick up contacts and even potential placements (if you&#8217;re on a sandwich course) or employment for once you&#8217;ve graduated. This may not come in terms of a job offer, but showing your face at these conferences prove that you&#8217;re keen and interested. It will also be beneficial in at least being slightly familiar if a job opportunity comes up with someone you met there.</p>
<p>Finally, there is the CV. You can put on your CV and application forms that you attended this conference (of your own accord with your own money) so you could learn more about the profession in your own time. This shows dedication and interest. Potential employers hold this in high regard and can set you apart from other candidates going for the same job. Particularly if you are able to talk about what you learnt.</p>
<h3>OK, you&#8217;ve convinced me! Should I do anything to prepare?</h3>
<p>Yes, it is highly recommended, particularly if you are not overly familiar with the subjects being talked about. There is a variety of talks; some are basic/beginner, some more advanced. All talks will assume knowledge of PHP (after all, this is why we&#8217;re here) and experience with a LAMP (Linux, Apache, Mysql, PHP) server setup will be very beneficial as this is the most common platform for PHP development. You should also look at the <a href="http://conference.phpnw.org.uk/phpnw10/schedule/">talk schedule</a> and read up about the areas surrounding the talks, as this will give you some context for the talk and also help you decide which talks you are most interested in.</p>
<p>When coming to the conference it is recommended that you bring a laptop (if you have one) with a full battery. There will be power points available, but generally not in the rooms with talks and people will be fighting over them in the breaks. A laptop will allow you to do extra research around the area as well as communicate with other people on at the conference (via IRC, <a href="http://www.twitter.com/phpnw10" target="_blank">Twitter</a> etc..). Finally, come and say hello before the conference in the official PHPNW IRC channel: #phpnw on freenode, and don&#8217;t forget to <a href="conference.phpnw.org.uk/phpnw10/registration/">book your ticket</a>!<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/08/why-students-should-attend-phpnw10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Virtual Hosts for Development with Apache on Ubuntu</title>
		<link>http://www.rickogden.com/2010/07/virtual-hosts-for-development-with-apache-on-ubuntu/</link>
		<comments>http://www.rickogden.com/2010/07/virtual-hosts-for-development-with-apache-on-ubuntu/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 14:58:38 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=355</guid>
		<description><![CDATA[I do a lot of development on Ubuntu, as I often have multiple projects on the go which are nothing to do with each other, it&#8217;s often easier to create separate virtual hosts on my local development machine. This means that when they are ready for the &#8220;real world&#8221;, they are already set up as [...]]]></description>
			<content:encoded><![CDATA[<p>I do a lot of development on Ubuntu, as I often have multiple projects on the go which are nothing to do with each other, it&#8217;s often easier to create separate virtual hosts on my local development machine. This means that when they are ready for the &#8220;real world&#8221;, they are already set up as isolated sites at the root of their domain (rather than in a subdirectory of an existing site).</p>
<p>In order to do this, you need to create a new virtual host in your Apache config. Create a new file in the directory /etc/apache2/sites-available and open it in your favourite editor. It doesn&#8217;t matter what the file is called, but it&#8217;s best to keep it descriptive. We&#8217;ll call this project &#8220;mysite&#8221;, so the file can be called &#8220;mysite&#8221;. In the file we need to configure the Apache virtual host.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;VirtualHost 127.0.0.1&gt;
ServerName mysite.localhost
DocumentRoot /var/www/mysite/public/
&lt;/VirtualHost&gt;
</pre>
<p>In the VirtualHost tag, you put the IP, seeing as I only want this for local loopback (for development) I have just put 127.0.0.1. The ServerName is the URL that you use to connect to the site and the DocumentRoot is where the public documents are stored. This is a very basic set up, so there are many more options you can add.</p>
<p>To make the site enabled, you create a symbolic link to the file from the sites-enabled directory.</p>
<pre class="brush: plain; light: true; title: ; notranslate">
cd /etc/apache2/sites-enabled
ln -s ../sites-available/mysite mysite
</pre>
<p>You now need to add the subdomain (mysite.localhost) to the list of hosts, so open /etc/hosts in your favourite editor and append the line:</p>
<pre class="brush: plain; light: true; title: ; notranslate">127.0.0.1 mysite.localhost</pre>
<p>And then restart Apache:</p>
<pre class="brush: plain; light: true; title: ; notranslate">sudo /etc/init.d/apache2 restart</pre>
<p>Now you should be able to visit http://mysite.localhost on the local machine (assuming the directory does actually exist).</p>
<p>This should also be similar on MacOS and other linux Distros, but the file locations (particularly for Apache) will vary.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/07/virtual-hosts-for-development-with-apache-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>LTSP Part 2 &#8211; Configuration</title>
		<link>http://www.rickogden.com/2010/06/ltsp-part-2-configuration/</link>
		<comments>http://www.rickogden.com/2010/06/ltsp-part-2-configuration/#comments</comments>
		<pubDate>Tue, 22 Jun 2010 08:19:37 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[gpxe]]></category>
		<category><![CDATA[ltsp]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=340</guid>
		<description><![CDATA[In the previous post I had the problem: &#8230; when I boot up, I get the Ubuntu boot screen, which shows it’s connecting to the terminal server, however it then fails with an errror saying Error: Failed to connect to NBD server And I get sent to a basic busybox shell. There were two reasons [...]]]></description>
			<content:encoded><![CDATA[<p>In the <a href="http://www.rickogden.com/2010/06/ltsp-part-1-gpxe/">previous post</a> I had the problem:</p>
<blockquote><p>
&#8230; when I boot up, I get the Ubuntu boot screen, which shows it’s connecting to the terminal server, however it then fails with an errror saying</p>
<p>Error: Failed to connect to NBD server</p>
<p>And I get sent to a basic busybox shell.
</p></blockquote>
<p>There were two reasons for this.</p>
<h3>PXE&#8230; booted</h3>
<p>First of all, because I obtain the DHCP separately from the network boot, I need to treat it as if it&#8217;s a static IP. LTSP can handle static IPs, but this posed a couple of problems. I would need to specify a separate config file for each MAC address in the pxelinux.cfg/ directory. Secondly it would require each MAC address to be given the same IP each time (this was not going to happen).</p>
<p>So instead of getting gPXE to PXE boot, I completely bypass pxelinux.0 and use my own boot script. In this script I pass in the IP and other information. gPXE has some environment variables which can be used for this, so I wrote a script (The &#8216;x&#8217;s should be replaced by the terminal server&#8217;s IP address).</p>
<pre class="brush: bash; title: ; notranslate">#!gpxe
dhcp net0
kernel tftp://xxx.xxx.xxx.xxx/ltsp/i386/vmlinuz ip=${ip}:xxx.xxx.xxx.xxx:${gateway}:${netmask}:${hostname}:eth0:none nbdroot=xxx.xxx.xxx.xxx:2000
initrd tftp://xxx.xxx.xxx.xxx/ltsp/i386/initrd.img
boot vmlinuz
</pre>
<p>This script retrieves the kernel, and passes as parameters the environment variables (which were set by the dhcp) the IP, gateway, netmask and hostname. Another parameter is the nbd server location and port. The we retrieve the initial ramdisk (initrd) and boot.</p>
<h3>More haste less speed</h3>
<p>After that was fixed, on my test machines it still didn&#8217;t connect to the NBD server. This is because my test machines are core2duo 3ghz with 4gb RAM; they were so fast at booting up, that it didn&#8217;t get a response from the NBD server in time. I diagnosed this by adding the parameter:</p>
<pre class="brush: bash; light: true; title: ; notranslate">break=mount</pre>
<p>To the kernel line in the script above. This stopped the boot, then it got a response from the server, and when I pressed ctrl+D (to continue the boot) it booted up fine. This is a bug in the ltsp_nbd script.</p>
<p>I solved this by logging into the terminal server and opening the file /opt/ltsp/i386/usr/share/initramfs-tools/scripts/ltsp_nbd, then added the line:</p>
<pre class="brush: bash; light: true; title: ; notranslate">sleep 5</pre>
<p>after the line:</p>
<pre class="brush: bash; light: true; title: ; notranslate">ip link set lo up</pre>
<p>This meant that the script paused for 5 seconds to allow the NBD server to respond.</p>
<p>Once edited the initramfs needs updating, as do the kernels:</p>
<pre class="brush: bash; light: true; title: ; notranslate">
chroot /opt/ltsp/i386 update-initramfs -u
ltsp-update-kernels
</pre>
<p>I will be writing a part 3 to this sometime soon talking about some of the customisations I will be adding.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/06/ltsp-part-2-configuration/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>LTSP Part 1 &#8211; gPXE</title>
		<link>http://www.rickogden.com/2010/06/ltsp-part-1-gpxe/</link>
		<comments>http://www.rickogden.com/2010/06/ltsp-part-1-gpxe/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 10:05:40 +0000</pubDate>
		<dc:creator>Rick Ogden</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[gpxe]]></category>
		<category><![CDATA[ltsp]]></category>
		<category><![CDATA[remote desktop]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.rickogden.com/?p=324</guid>
		<description><![CDATA[Disclaimer: This is a work in progress blog post. There may be better ways of doing things, and things may have been done wrong. Although I hope you will find this helpful, please don&#8217;t take the contents of this post as gospel. At work we have Ubuntu terminal servers which the students currently connect to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Disclaimer: This is a work in progress blog post. There may be better ways of doing things, and things may have been done wrong. Although I hope you will find this helpful, please don&#8217;t take the contents of this post as gospel.</strong></p>
<p>At work we have Ubuntu terminal servers which the students currently connect to using NX on ThinStation in the labs. This is not an ideal setup, especially because the ThinStation kernel is too old to run on (even relatively) modern hardware. It is designed to setup an old computer as a thin client, and allow it to access a terminal server which will do all the hard work.</p>
<p>The other issue which we have is that the network is not owned or managed by my department (computer science), but by the central IT department of the university. This means I do not have access to the DHCP server which is required to PXE boot the computers. On top of this, the computers need to dual boot between the thin client/terminal server and a local installation of Windows.</p>
<p>This is where gPXE comes to the rescue! What gPXE allows me to do is retrieve an IP address from the university DHCP server, and then create my own network boot script completely separately.<br />
<span id="more-324"></span></p>
<h3>LTSP Installation on Ubuntu</h3>
<p>This was (relatively) painless on Ubuntu Lucid. As I&#8217;m currently just setting up a test server, I used the ltsp-server-standalone package.</p>
<pre class="brush: bash; light: true; title: ; notranslate">sudo apt-get install ltsp-server-standalone</pre>
<p>This installs all the relevant packages (including DHCP) to set up a terminal server. Once that had installed I needed to make the thin client OS. Also, as the terminal server is running Ubuntu 64 and the clients are 32 bit, I needed to use the &#8211;arch parameter.</p>
<pre class="brush: bash; light: true; title: ; notranslate">sudo ltsp-build-client --arch i386</pre>
<p>For some reason I had trouble with the default tftp server (tftpd-hpa), so I ended up installing at atftpd.</p>
<pre class="brush: bash; light: true; title: ; notranslate">sudo apt-get install atftpd</pre>
<p>This seemed to solve the problem.</p>
<h3>gPXE</h3>
<p>The easiest way to test gPXE is to download the ISO from <a href="http://rom-o-matic.net/">rom-o-matic</a>, burn it to a CD and boot off it. During the boot sequence it tells you to press ctrl+B to enter the console, if you do that you have a minimal <abbr title="Command Line Interface">CLI</abbr>.</p>
<p>What I wanted to do was to retrieve an IP from the main DHCP server, and then specify the next-server and boot file (which are normally specified by the DHCP server).</p>
<pre class="brush: plain; title: ; notranslate">
gpxe&gt; dhcp net0
gpxe&gt; set next-server xxx.xxx.xxx.xxx
gpxe&gt; set filename ltsp/i386/pxelinux.0
gpxe&gt; autoboot
</pre>
<p>Line 1 tells it to retrieve an IP for the network adapted net0. This may differ if you have multiple network cards installed. Line 2 sets where it should go to next (which contains the tftp server location to download the pxe boot image). Line 3 sets the path/filename for the pxelinux boot image which is the default location for aftpd. Finally we tell it to attempt to boot with those parameters.</p>
<h3>Problems</h3>
<p>As stated at the top, this is still very much work in progress, and I plan to edit it as I find fixes. I am still have trouble with this (as I stated at the top this is work in progress, and will be editing it as I go along). The first is that gPXE has trouble working with a batch of network cards which we have in some of the labs. These cards are on-board Intel 82566DM [8086/104a] (rev 2) network cards. For some reason gPXE cannot interface with them. I am going to try and overcome this by putting other network cards into those machines.</p>
<p>Also, when I boot up, I get the Ubuntu boot screen, which shows it&#8217;s connecting to the terminal server, however it then fails with an errror saying</p>
<blockquote><p>Error: Failed to connect to NBD server</p></blockquote>
<p>And I get sent to a basic busybox shell.</p>
<p>This (I am hoping) is nothing to do with the gPXE boot, but with the LTSP setup. So I will do further investigation into that and report back.<!-- PHP 5.x --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.rickogden.com/2010/06/ltsp-part-1-gpxe/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
<!-- This Quick Cache file was built for (  www.rickogden.com/feed/ ) in 0.63933 seconds, on Feb 6th, 2012 at 11:33 pm UTC. -->
<!-- This Quick Cache file will automatically expire ( and be re-built automatically ) on Feb 7th, 2012 at 12:33 am UTC -->
