<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>spoffle</title>
	
	<link>http://www.spoffle.com</link>
	<description>no more noise</description>
	<pubDate>Tue, 21 Oct 2008 09:30:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Spoffle" type="application/rss+xml" /><item>
		<title>GeoTarget Wordpress plugin</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/xwvHqmBXrwY/</link>
		<comments>http://www.spoffle.com/technical/geotarget-wordpress-plugin/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 10:38:19 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/?p=66</guid>
		<description><![CDATA[Before downloading this plugin you MUST first read and follow this post or it will NOT work.
OK, this is my first ever Wordpress plugin.  It came out of a need to be able to show country specific content on a Wordpress based blog.  You can use it for anything from showing a simple Bonjour [...]]]></description>
			<content:encoded><![CDATA[<p>Before downloading this plugin you MUST first read and follow <a href="http://www.spoffle.com/technical/geotarget-database-setup/">this post</a> or it will NOT work.</p>
<p>OK, this is my first ever Wordpress plugin.  It came out of a need to be able to show country specific content on a Wordpress based blog.  You can use it for anything from showing a simple Bonjour to French visitors to displaying geo targeted advertising.  Once it&#8217;s installed it&#8217;s pretty simple to use.</p>
<h2>Installation instructions</h2>
<p><strong>1</strong>. Create the geo targeting database by following the <a href="http://www.spoffle.com/technical/geotarget-database-setup/">GeoTarget database setup</a> post mentioned above.<br />
<strong>2</strong>. Download and unzip the plugin into your plugins folder (download link below).<br />
<strong>3</strong>. Open the GeoTarget.php file and edit the following:-</p>
<p><code>/* USER DEFINED VARIABLES HERE */<br />
$DatabaseName = "databasename"; // your database name<br />
$Username = "username"; // your database username<br />
$Password = "password"; // your database password<br />
$DatabaseServer = "localhost"; // 99% chance you can leave this set to localhost<br />
$CookieDomain = ".yourdomain.com"; // .yourdomain.com<br />
$CookieDuration = 3600; // default to 3600 seconds (1 hour)</code></p>
<p><strong>4</strong>. Activate the plugin.</p>
<h2>How to use the GeoTarget plugin</h2>
<p>Once installed and activated you will be able to use the <code>$country_code</code> variable within your theme files.  It will be a 2 character string representing the country code of the user based on their IP.  It can therefore be &#8220;US&#8221;, &#8220;UK&#8221;, &#8220;FR&#8221;, etc.</p>
<p>Here is an example piece of code to use within a theme file to get you started:-</p>
<p><code>&lt;?php if ( $country_code == "FR" ) : ?&gt;&lt;p&gt;Bonjour&lt;/p&gt;&lt;?php else: ?&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;?php endif; ?&gt;</code></p>
<p>Download version 0.1 here: <code><a href="http://www.spoffle.com/wp-content/plugins/download-monitor/download.php?id=1" title="Version 0.1 downloaded 387 times" >GeoTarget</a> (downloaded </code><code>387 times)<br />
</code></p>
<p>Any questions or suggestions for improvements are welcome.</p>
<h2>Changelog</h2>
<p><strong>Version 0.1</strong></p>
<p>16-October-2008</p>
<ul>
<li> Let&#8217;s go!</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/geotarget-wordpress-plugin/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/geotarget-wordpress-plugin/</feedburner:origLink></item>
		<item>
		<title>GeoTarget database setup</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/c0Cn7sQefjA/</link>
		<comments>http://www.spoffle.com/technical/geotarget-database-setup/#comments</comments>
		<pubDate>Thu, 16 Oct 2008 10:38:11 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/?p=13</guid>
		<description><![CDATA[If you want to use the GeoTarget Wordpress plugin or you simply want to have a database you can use to determine a user&#8217;s country from their IP, this is the post for you.  This posts assumes we&#8217;re all using MySQL, PHP and phpMyAdmin.
Firstly we need to download MaxMind&#8217;s GeoLite Country database.  Make sure you [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to use the <a href="http://www.spoffle.com/technical/geotarget-wordpress-plugin/">GeoTarget Wordpress plugin</a> or you simply want to have a database you can use to determine a user&#8217;s country from their IP, this is the post for you.  This posts assumes we&#8217;re all using <a href="http://www.mysql.com/">MySQL</a>, <a href="http://www.php.net/">PHP</a> and <a href="http://www.phpmyadmin.net/home_page/index.php">phpMyAdmin</a>.</p>
<p>Firstly we need to download <a href="http://www.maxmind.com/app/geoip_country">MaxMind&#8217;s GeoLite Country database</a>.  Make sure you download the CSV format.  Unzip it and then we&#8217;re ready for the next step.</p>
<p>Login to your phpMyAdmin page and select the database you want to use.  Select the &#8216;SQL&#8217; tab and then paste in the following code:-</p>
<p><code>CREATE TABLE ip2country (<br />
ip_start char(15) NOT NULL,<br />
ip_end char(15) NOT NULL,<br />
int_start int(10) unsigned NOT NULL,<br />
int_end int(10) unsigned NOT NULL,<br />
country_code char(2) NOT NULL,<br />
country_name varchar(50) NOT NULL<br />
);</code></p>
<p>Then hit &#8216;Go&#8217;.</p>
<p>Now select the newly created table &#8216;ip2country&#8217; and select the &#8216;Import&#8217; tab.  Click &#8216;Browse&#8217; and select the GeoIPCountryWhois.csv file you downloaded and unzipped earlier.</p>
<p>Now alter the settings below as follows:-</p>
<p>Fields terminated by , (comma)</p>
<p>Lines terminated by \n</p>
<p>Click the image below to see how this should look.</p>
<p style="text-align: center;"><a href="http://www.spoffle.com/wp-content/uploads/geotarget-import-phpmyadmin.jpg"><img class="size-medium wp-image-63 aligncenter" title="geotarget-import-phpmyadmin.jpg" src="http://www.spoffle.com/wp-content/uploads/geotarget-import-phpmyadmin-300x196.jpg" alt="geotarget-import-phpmyadmin-settings" width="300" height="196" /></a></p>
<p style="text-align: left;">Now hit &#8216;Go&#8217; and wait for a while.  It&#8217;s a large file (approx 8MB) so it will take a while to upload to your server.</p>
<p style="text-align: left;">Once this has been completed succesfully you are now ready to use the <a href="http://www.spoffle.com/technical/geotarget-wordpress-plugin/">GeoTarget Wordpress plugin</a>.</p>
<p style="text-align: left;">However if you do not want to use this database as part of the Wordpress plugin or you would like to see some example PHP code to use with this database then see below.</p>
<p><code>&lt;?php</p>
<p>if(isset($_COOKIE[&quot;country_code&quot;]))<br />
{<br />
$country_code = $_COOKIE['country_code']; // use cookie value if set<br />
}<br />
else<br />
{<br />
$DatabaseName = &quot;databasename&quot;; // your database name<br />
$Username = &quot;username&quot;; // your database username<br />
$Password = &quot;password&quot;; // your database password<br />
$DatabaseServer = &quot;localhost&quot;; // 99% chance you can leave this set to localhost<br />
$CookieDomain = &quot;.yourdomain.com&quot;; // insert .yourdomain.com here<br />
$CookieDuration = 3600; // default to 3600 seconds (1 hour)</p>
<p>$link = mysql_connect($DatabaseServer, $Username, $Password) or die(&#8217;Could not connect: &#8216; . mysql_error()); // connect to database server<br />
mysql_select_db($DatabaseName) or die(&#8217;Could not select database&#8217;); // select database<br />
$ip = $_SERVER[&quot;REMOTE_ADDR&quot;]; // get the IP address<br />
$result = mysql_query(&quot;SELECT country_code FROM ip2country WHERE INET_ATON(&#8217;$ip&#8217;) BETWEEN int_start AND int_end&quot;); // look up IP address</p>
<p>$codes = mysql_fetch_array($result); // get result<br />
$country_code = $codes['country_code']; // two-letter country code</p>
<p>mysql_close($link); // clean up</p>
<p>setcookie(&quot;country_code&quot;, $country_code, time()+$CookieDuration, &quot;/&quot;, $CookieDomain, 0); // sets a country_code cookie<br />
}</p>
<p>if ($country_code == &quot;GB&quot;)<br />
{<br />
// do something UK specific<br />
}<br />
elseif ($country_code == &quot;FR&quot;)<br />
{<br />
// do something French specific<br />
}<br />
else<br />
{<br />
// do something non-geo specific<br />
}</p>
<p>?&gt;</code></p>
<p>That should be fairly self explanatory.  If not please ask questions below.</p>
<p>I know the database format and querying is not very efficient at all, and there are two excellent posts (<a href="http://bartomedia.blogspot.com/2007/11/maxmind-geoip-setup-tutorial-using.html">here</a> and <a href="http://jcole.us/blog/archives/2007/11/24/on-efficiently-geo-referencing-ips-with-maxmind-geoip-and-mysql-gis/">here</a>) which I intend to one day impliment myself, but for now the above method works fine for low to medium traffic sites.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/geotarget-database-setup/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/geotarget-database-setup/</feedburner:origLink></item>
		<item>
		<title>What does spoffle mean?</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/E7BxlgVNVMY/</link>
		<comments>http://www.spoffle.com/opinion/what-does-spoffle-mean/#comments</comments>
		<pubDate>Fri, 15 Aug 2008 12:36:55 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/?p=31</guid>
		<description><![CDATA[Good question, and one I&#8217;ve heard a few times now.  I&#8217;d better explain.
I first heard the word spoffle described by Stephen Fry as a word Hugh Laurie came up with when they were recording something in a studio and he wanted one of those spongy foam microphone covers.  When he asked for it [...]]]></description>
			<content:encoded><![CDATA[<p>Good question, and one I&#8217;ve heard a few times now.  I&#8217;d better explain.</p>
<p>I first heard the word spoffle described by <a href="http://www.stephenfry.com/">Stephen Fry</a> as a word Hugh Laurie came up with when they were recording something in a studio and he wanted one of those spongy foam microphone covers.  When he asked for it the word he came up with was spoffle, &#8220;umm could you get me the spoffle thing for this mic?&#8221;  What is probably more surprising is that the sound technician knew precisely what he meant.  In Stephen&#8217;s mind Hugh had invented a new word.  This also stuck in my mind for some bizarre reason, perhaps because I&#8217;ve always been a fan of theirs ever since <a href="http://www.bbc.co.uk/comedy/abitoffryandlaurie/index.shtml">A bit of Fry and Laurie</a>.</p>
<p>Searching <a href="http://www.urbandictionary.com/">Urban Dictionary</a> it seems they agree with my memories <a href="http://www.urbandictionary.com/define.php?term=spoffle">here</a>.</p>
<p>Hugh Laurie:-</p>
<blockquote><p>Can we put a spoffle on the mike because I&#8217;m getting too much pop on the Ps.</p></blockquote>
<p>So a spoffle is one of these:-</p>
<p><a href="http://www.spoffle.com/wp-content/uploads/spoffle.jpg"><img src="http://www.spoffle.com/wp-content/uploads/spoffle-150x150.jpg" alt="spoffle cover for a microphone" width="150" height="150" class="size-thumbnail wp-image-41 center" /></a></p>
<p>The spongy foam microphone cover that reduces the &#8220;popping&#8221; effect of the <a href="http://en.wikipedia.org/wiki/List_of_consonants#Plosive_.28stop.29_consonants">plosive consonant sounds</a> as recorded by a microphone.</p>
<h2>Another meaning?</h2>
<p>I&#8217;ve since discovered that there is a Disney television programme called <a href="http://en.wikipedia.org/wiki/Johnny_and_the_Sprites">Johnny and the Sprites</a> which started late 2005 and uses the word spoffle to describe the Sprite plant food that <a href="http://www.lesliecarrara-rudolph.com/Johnny/Johnny%20&#038;%20The%20Sprites/ginger%201.jpg">Ginger</a> spreads over the plants to make them grow.  See here a youtube video when things go wrong:-</p>
<h3>No Spoffle</h3>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/C3ajNRD4_GQ&#038;hl=en&#038;fs=1"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.youtube.com/v/C3ajNRD4_GQ&#038;hl=en&#038;fs=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>So there we have it, I think that&#8217;s all our spoffle word references covered.</p>
<p>I was hoping spoffle.com would become a place where I could write useful information for myself as well as others to resource.  The word spoffle seemed appropriate (the original meaning).  Rather than just regurgitating old news or reblogging everything under the sun it would be a place of originality and &#8216;no more noise&#8217;.  Well we&#8217;ll see how it pans out, because the judges are still out on that one I guess.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/opinion/what-does-spoffle-mean/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/opinion/what-does-spoffle-mean/</feedburner:origLink></item>
		<item>
		<title>Remove WordPress generator meta tag from header</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/1Md4mVB8OuQ/</link>
		<comments>http://www.spoffle.com/technical/remove-wordpress-generator-meta-tag-from-header/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 11:16:52 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/?p=22</guid>
		<description><![CDATA[Having upgraded to Wordpress 2.5.1 I discovered that if you include wp_head(); in your theme&#8217;s header.php, it now displays the following within the generated html header tags by default.
&#60;meta name=&#34;generator&#34; content=&#34;WordPress 2.5.1&#34; /&#62;
Perhaps you don&#8217;t want to announce to the world exactly which version of Wordpress you are using - especially if you are slow [...]]]></description>
			<content:encoded><![CDATA[<p>Having upgraded to <a href="http://wordpress.org/download/">Wordpress 2.5.1</a> I discovered that if you include <code>wp_head();</code> in your theme&#8217;s header.php, it now displays the following within the generated html header tags by default.</p>
<p><code>&lt;meta name=&quot;generator&quot; content=&quot;WordPress 2.5.1&quot; /&gt;</code></p>
<p>Perhaps you don&#8217;t want to announce to the world exactly which version of Wordpress you are using - especially if you are slow to upgrade when new exploits become known.</p>
<p>The answer is to add:-</p>
<p><code>remove_action('wp_head', 'wp_generator');</code></p>
<p>to your theme&#8217;s <code>functions.php</code> file.</p>
<p>If you don&#8217;t have the file <code>functions.php</code> within your theme&#8217;s folder, simply make one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/remove-wordpress-generator-meta-tag-from-header/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/remove-wordpress-generator-meta-tag-from-header/</feedburner:origLink></item>
		<item>
		<title>Firefox about:config hacks</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/p7NHhJU1cnE/</link>
		<comments>http://www.spoffle.com/technical/firefox-about-config-hacks/#comments</comments>
		<pubDate>Wed, 18 Jun 2008 10:51:15 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/technical/firefox-aboutconfig-hacks/</guid>
		<description><![CDATA[The world and his wife have just installed/updated to Firefox 3.  I love this browser and have been using it for a long time.  However, I&#8217;ve made a few hacks I thought I&#8217;d share.
Open a tab and type into the url bar about:config and then click on the &#8220;I&#8217;ll be careful, I promise!&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p>The world and his wife have just installed/updated to <a href="http://www.mozilla.com/en-US/firefox/">Firefox 3</a>.  I love this browser and have been using it for a long time.  However, I&#8217;ve made a few hacks I thought I&#8217;d share.</p>
<p>Open a tab and type into the url bar <code>about:config</code> and then click on the &#8220;I&#8217;ll be careful, I promise!&#8221; button and you&#8217;re ready to roll.  Each of the following hacks requires you to start typing in the preference name into the filter bar until you&#8217;ve narrowed it down enough to see it.  Then you simply double click on it to alter its value.</p>
<p>These are hacks and some have potentially grave consequences, so use at your own risk.</p>
<h2>Allowing Firefox to resize any popup windows</h2>
<p>It&#8217;s sometimes annoying when you get a popup window that you want to resize but the web developer has set the javascript property resizable=no.  Do the following to take back control.</p>
<p><code>dom.disable_window_open_feature.resizable</code><br />
default set to false, double click and set to true</p>
<h2>Disabling right click disabled</h2>
<p>Sometimes web developers use javascript to disable your right click.  Not anymore!</p>
<p><code>dom.event.contextmenu.enabled</code><br />
default true, double click and set to false</p>
<h2>URL bar declutter rich suggestions</h2>
<p>With Firefox 3 comes a rather (in my opinion) cluttered suggestion drop down while typing in a URL into the URL bar.  I&#8217;ve turned my down so I only see the top 3 results excluding any from my bookmarks.</p>
<p><code>browser.urlbar.maxRichResults</code><br />
default 12, I&#8217;ve set mine to 3</p>
<p><code>browser.urlbar.matchOnlyTyped</code><br />
default false, set to true to exclude bookmarks</p>
<h2>Enable ANY and ALL Add-ons</h2>
<p><strong>WARNING: This hack is probably the one you shouldn&#8217;t follow if you aren&#8217;t sure about which Add-ons you&#8217;ve installed.</strong></p>
<p>By default Firefox checks for compatibility and update security of any extensions (Add-ons) you have installed.  This can mean when you update Firefox that some Add-ons become disabled because they are deemed not compatible.  However, in reality they may still work fine.</p>
<p><code>extensions.checkCompatibility</code><br />
default true, toggle to false</p>
<p><code>extensions.checkUpdateSecurity</code><br />
default true, toggle to false</p>
<p>Gulp, I can&#8217;t believe I&#8217;ve just published that hack!  Don&#8217;t shoot the messenger <img src='http://www.spoffle.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h2>Restoring about:config to default values</h2>
<p>If you make a mistake you might want to <strong>restore about:config</strong> to default values.  Just below the &#8216;Show All&#8217; button to the right hand top corner of the about:config screen there is a little icon, click on this and choose &#8216;Restore Defaults&#8217;.</p>
<p><em>EDIT: Just after posting I found <a href="http://www.computerworld.com/action/article.do?command=viewArticleBasic&#038;articleId=9020880">this great article</a> running over 6 pages with loads of about:config hacks.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/firefox-about-config-hacks/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/firefox-about-config-hacks/</feedburner:origLink></item>
		<item>
		<title>Accessing a shared Ubuntu directory via Windows</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/PUL44NhYdSk/</link>
		<comments>http://www.spoffle.com/technical/accessing-a-shared-ubuntu-directory-via-windows/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 13:02:27 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/technical/accessing-a-shared-ubuntu-directory-via-windows/</guid>
		<description><![CDATA[I&#8217;ve set up an Ubuntu LAMP server for use with a Windows machine over a local network.  This was primarily so my wife could develop websites from her desktop Windows machine on a local LAMP server before uploading to our live server.
I was writing some tracking code in PHP for one of those websites [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve set up an <a href="http://www.spoffle.com/technical/configure-ubuntu-lamp-with-windows/">Ubuntu LAMP server for use with a Windows machine over a local network</a>.  This was primarily so my wife could develop websites from her desktop Windows machine on a local LAMP server before uploading to our live server.</p>
<p>I was writing some tracking code in PHP for one of those websites and needed to gain access to this local test server myself.  It made sense to me that it would be simpler if I gave myself access from my Windows desktop to the same webpage files as my wife.  Here&#8217;s how I did it.</p>
<p>First I needed to give myself a user account on that server.</p>
<p><code>sudo useradd neil<br />
sudo passwd neil</code></p>
<p>Then I created a group called &#8216;usboth&#8217; and added both my username and my wife&#8217;s to it.</p>
<p><code>sudo groupadd usboth<br />
sudo usermod -a -G usboth neil<br />
sudo usermod -a -G usboth amanda</code></p>
<p>I then needed to change the group ownership of the webpages directory to allow users in that group writable access.</p>
<p><code>sudo chgrp -R usboth /home/amanda/webpages<br />
sudo chmod g+w /home/amanda/webpages</code></p>
<h2>Altering Samba settings</h2>
<p>Samba allows us to connect to our files from our Windows Desktops, so first I needed to add myself as a samba user.</p>
<p><code>sudo ambpasswd -a neil</code></p>
<p>And then edit smb.conf.</p>
<p><code>sudo pico -w /etc/samba/smb.conf</code></p>
<p>Altering Amanda&#8217;s configuration at the bottom of the file to this:-</p>
<p><code>[amanda]<br />
path = /home/amanda/webpages<br />
valid users = @usboth<br />
available = yes<br />
browsable = yes<br />
public = no<br />
writable = yes<br />
force group = usboth<br />
inherit acls = yes<br />
create mask = 0666<br />
directory mask = 0775</code></p>
<p>And then replicating it for me like so:-</p>
<p><code>[neil]<br />
path = /home/amanda/webpages<br />
valid users = @usboth<br />
available = yes<br />
browsable = yes<br />
public = no<br />
writable = yes<br />
force group = usboth<br />
inherit acls = yes<br />
create mask = 0666<br />
directory mask = 0775</code></p>
<p>Restart samba and we&#8217;re done.</p>
<p><code>sudo /etc/init.d/samba restart</code></p>
<p>If you find that now apache can&#8217;t read those files you may need to alter the permissions.</p>
<p><code>sudo chmod -R 777 /home/amanda/webpages</code></p>
<p>But with the samba settings above any new files created from now on should be fine.</p>
<p>We can now both map the webpages directory as a network drive and work collaboratively on the same files before uploading them live.  Just the job!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/accessing-a-shared-ubuntu-directory-via-windows/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/accessing-a-shared-ubuntu-directory-via-windows/</feedburner:origLink></item>
		<item>
		<title>Connecting to your Ubuntu Server remotely</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/qFomxbVdCiM/</link>
		<comments>http://www.spoffle.com/technical/connecting-ubuntu-via-windows-ssh/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 15:57:42 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/technical/connecting-ubuntu-via-windows-ssh/</guid>
		<description><![CDATA[As you already know, my wife is using an old computer running Ubuntu for her web development server.  I can&#8217;t see the point in having a monitor plugged into it when all she ever needs to do is either a) alter the DocumentRoot when she works on a different site or b) wants to [...]]]></description>
			<content:encoded><![CDATA[<p>As you already know, my wife is <a href="http://www.spoffle.com/technical/follow-up-on-my-ubuntu-lamp-how-to/">using an old computer running Ubuntu</a> for her web development server.  I can&#8217;t see the point in having a monitor plugged into it when all she ever needs to do is either a) alter the DocumentRoot when she works on a different site or b) wants to shut it down (rarely).</p>
<p>Here&#8217;s how we can do all this remotely from our Windows desktop.</p>
<h2>Installing SSH on Ubuntu desktop</h2>
<p><code>sudo apt-get install ssh</code></p>
<p>That was so easy it barely needed its own heading.  SSH stands for Secure SHell and allows us to make a secure direct connection with our server.  To do this we need to use an SSH client.</p>
<h2>Connecting to our server using PuTTy</h2>
<p><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> is a free and simple ssh client for Windows.  Simply download the latest version <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html">here</a> and then run it.</p>
<p>Type in your Ubuntu server&#8217;s IP address where it says &#8216;Host Name (or IP address)&#8217; and then hit the &#8216;Open&#8217; button.  From here you simply login with your Linux username and password.  Now you are sitting at your Windows desktop machine but using your Ubuntu Server&#8217;s command line as if you were right there on your server.</p>
<p>TIP: if you want to remotely shutdown your server you type in:-</p>
<p><code>sudo /etc/sbin/shutdown -h now</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/connecting-ubuntu-via-windows-ssh/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/connecting-ubuntu-via-windows-ssh/</feedburner:origLink></item>
		<item>
		<title>Using your Ubuntu Apache test server with Windows</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/3KmfDsxSZPQ/</link>
		<comments>http://www.spoffle.com/technical/configure-ubuntu-lamp-with-windows/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 14:12:14 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/technical/configure-ubuntu-lamp-with-windows/</guid>
		<description><![CDATA[So we&#8217;ve set up our Ubuntu LAMP server, but now we want to use it to develop our wonderful websites.  Years ago I only had one computer so I ran Linux on it and worked directly on the server itself as well as using it as my desktop.  However, I personally prefer to [...]]]></description>
			<content:encoded><![CDATA[<p>So we&#8217;ve <a href="http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/">set up our Ubuntu LAMP server</a>, but now we want to use it to develop our wonderful websites.  Years ago I only had one computer so I ran Linux on it and worked directly on the server itself as well as using it as my desktop.  However, I personally prefer to use Windows as my desktop and use an entirely separate machine as my test LAMP server.  I will be writing this &#8216;how to&#8217; from that point of view, although there will be some things you can take away from this if you intend on running just Linux on one machine and nothing else.</p>
<p>NOTE: wherever you see <i>username</i> you need to change it for your actual Linux username.</p>
<h2>Setting up a static IP address</h2>
<p>Using the top menu navigate as follows:-</p>
<p>System > Administration > Network | Network Settings > Connections Tab > Choose Unlock > (enter password) > Choose Wired connection (or whatever connection method you use) > Properties > untick Enable roaming mode > choose:-</p>
<p>Configuration: Static IP Address<br />
IPaddress: 192.168.1.xx , where xx is a number you choose between 0-255 (perhaps your network is 192.168.<b>0</b>.xx - so choose accordingly)<br />
Subnet mask: 255.255.255.0<br />
Gateway address: 192.168.1.1 (this is my router address, perhaps yours is 192.168.<b>0</b>.1 or something else!)</p>
<p><code>sudo /etc/init.d/networking restart</code></p>
<p>This basically ensures we have a static IP for our server.  It means that when we want to see our website from our local network (on our Windows machine) we simply type in http://192.168.1.xx/ (whatever you chose as the IP address).  Do it now and you should see the message &#8220;It works!&#8221;.  If not, something went wrong.</p>
<h2>Setting up samba</h2>
<p><code>sudo apt-get install samba<br />
sudo ambpasswd -a username</code></p>
<p>Where username is your Linux username.  Here you want to have your Windows username and password identical to that of your Linux username and password.  Capitals matter.  If you log into Windows with Fred but your Linux username is fred then you need to change your Windows username to fred also.  First change it to fred1 and then fred, because Windows thinks Fred and fred are the same and won&#8217;t change it directly.</p>
<p><code>gksudo /etc/samba/smb.conf</code></p>
<p>Find and set:-</p>
<p><code>workgroup = MSHOME</code></p>
<p>remove the semicolon (;) from the beginning of</p>
<p><code>security = user</code></p>
<p>And then at the very bottom of the conf file add:-</p>
<p><code>[username]<br />
path = /home/username/webpages<br />
available = yes<br />
browsable = yes<br />
public = no<br />
writable = yes</code></p>
<p>Now save and exit and restart Samba</p>
<p><code>sudo /etc/init.d/samba restart</code></p>
<p>So now we can use our Windows machine to navigate the network, find our Ubuntu server and browse all our /home/<i>username</i>/ files.  Personally I right click on here and choose to map as network drive so it&#8217;s easily available whenever I want it.  We&#8217;re nearly there!</p>
<h2>Configuring a new DocumentRoot for apache</h2>
<p>Create a directory in your /home/</i>username</i>/ called webpages.  This will be where we put the websites we work on.  Now we need to make apache look there instead of /var/www/.</p>
<p><code>mkdir /home/username/webpages/testsite01<br />
gksudo /etc/apache2/sites-available/default</code></p>
<p>Alter <code>DocumentRoot /var/www/</code> to <code>DocumentRoot /home/username/webpages/testsite01/</code></p>
<p>Also change <code>Directory /var/www/</code> to <code>Directory /home/username/webpages/</code> and then directly under this alter <code>AllowOverride None</code> to <code>AllowOverride All</code>.</p>
<p>Now restart apache and you&#8217;re done.</p>
<p><code>sudo /etc/init.d/apache restart</code></p>
<p>Whenever you want to work on a new website (say testsite02) then create the new folder under webpages and put all the working files in there.  Then edit <code>/etc/apache2/sites-available/default</code> and put a # in front of the old DocumentRoot and put a new one underneath pointing to your new testsite02.  Putting # in front acts as commenting it out.  This makes it easy to switch between the sites you are working on, commenting and uncommenting DocumentRoot as appropriate.  Don&#8217;t forget whenever you change DocumentRoot a restart of apache is required.</p>
<p>There are bound to be easier, better, more elegant ways to do this, but this is an example of how I do it and it works well for me, and maybe it could work well for you too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/configure-ubuntu-lamp-with-windows/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/configure-ubuntu-lamp-with-windows/</feedburner:origLink></item>
		<item>
		<title>Follow up on my Ubuntu LAMP how to</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/-r53cYXQpv8/</link>
		<comments>http://www.spoffle.com/technical/follow-up-on-my-ubuntu-lamp-how-to/#comments</comments>
		<pubDate>Fri, 06 Jun 2008 10:26:49 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/technical/follow-up-on-my-ubuntu-lamp-how-to/</guid>
		<description><![CDATA[It&#8217;s been over a year since I wrote &#8216;How to set up LAMP on Ubuntu Desktop Edition&#8216;.  Has anything changed?  Is there anything to add?  Let&#8217;s find out.
My wife is now working with me so I have decided that she too requires her own dev server, giving me a perfect opportunity to [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been over a year since I wrote &#8216;<a href="http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/">How to set up LAMP on Ubuntu Desktop Edition</a>&#8216;.  Has anything changed?  Is there anything to add?  Let&#8217;s find out.</p>
<p>My wife is now working with me so I have decided that she too requires her own dev server, giving me a perfect opportunity to start from scratch.  I downloaded the latest edition of <a href="http://www.ubuntu.com/GetUbuntu/download">Ubuntu</a> (Ubuntu 8.0.4 LTS Desktop Edition to be exact) and followed <a href="http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/">my old howto</a>.</p>
<h2>What has changed?</h2>
<p>Fortunately not a lot.  However, there are a couple of things to note.</p>
<p>When installing mysql-server you have to define a root password.  I can&#8217;t recall doing that before.  No biggy, just enter a password and get on with it.</p>
<p>However, when installing phpmyadmin you have to specify that you want to use it with apache2.  NOTE: you have to specifically choose apache2 by hitting space and then return.  If you simply hit return (what I did) then no alias is setup to allow you to access phpmyadmin via http://localhost/phpmyadmin/.  What if you made that mistake too?  Here&#8217;s what I did:-</p>
<p><code>sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf<br />
sudo /etc/init.d/apache2 restart</code></p>
<p>Apart from that little hiccup everything worked fine like before.</p>
<h2>Is there anything to add?</h2>
<p>My previous post attracted quite a few <a href="http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/#comments">support comments</a>, so it&#8217;s worth reading over those if you have any questions that may already be answered there.  I am going to outline one niggle below though.</p>
<p>Each time you restart apache2 you get this message:-</p>
<blockquote><p>apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.0.1 for ServerName</p></blockquote>
<p>This is unimportant unless you are running a live server that should have a fully qualified domain name!  Nevertheless, it&#8217;s a little annoying and can be fixed like this:-</p>
<p><code>gksudo gedit /etc/apache2/httpd.conf</code></p>
<p>Add the line:-</p>
<p><code>ServerName localhost</code></p>
<p>Restart apache2</p>
<p><code>sudo /etc/init.d/apache2 restart</code></p>
<p>And the message should no longer appear.</p>
<p>That&#8217;s it!  If you have any questions with regard to setting up LAMP on the Ubuntu Desktop Edition then please don&#8217;t hesitate to leave them below and I&#8217;ll do my best to answer them.</p>
<p>For my <a href="http://www.spoffle.com/technical/configure-ubuntu-lamp-with-windows/">next post</a> I will be describing in detail how I set up my wife&#8217;s laptop (running Windows Vista) to use her Ubuntu test server as a mapped network drive, allowing her to work on files &#8216;live&#8217;.</p>
<p>This is my ideal setup, as it gives you the benefits of using windows for your desktop environment while at the same time giving you the power of working on your websites directly on a LAMP server.  The only disadvantage is that it requires 2 computers, but with the cost being so low these days this shouldn&#8217;t be a huge problem.  Time to dust off that old computer in the corner and use it as a LAMP server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/follow-up-on-my-ubuntu-lamp-how-to/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/follow-up-on-my-ubuntu-lamp-how-to/</feedburner:origLink></item>
		<item>
		<title>How to set up LAMP on Ubuntu Desktop Edition</title>
		<link>http://feedproxy.google.com/~r/Spoffle/~3/lN4oL6HoTac/</link>
		<comments>http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/#comments</comments>
		<pubDate>Fri, 27 Apr 2007 21:43:17 +0000</pubDate>
		<dc:creator>Neil</dc:creator>
		
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/</guid>
		<description><![CDATA[So I&#8217;m now using my second laptop as a Linux dev server.  Ubuntu is what all the cool kids are using so I thought I&#8217;d give it a go.  Wait a minute, oh crap, I have to make a choice between Ubuntu Desktop Edition and Ubuntu Server Edition.  Well I want to [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m now using my second laptop as a Linux dev server.  <a href="http://www.ubuntu.com/">Ubuntu</a> is what all the cool kids are using so I thought I&#8217;d give it a go.  Wait a minute, oh crap, I have to make a choice between <a href="http://www.ubuntu.com/products/WhatIsUbuntu/desktopedition">Ubuntu Desktop Edition</a> and <a href="http://www.ubuntu.com/products/WhatIsUbuntu/serveredition">Ubuntu Server Edition</a>.  Well I want to use it as a <a href="http://en.wikipedia.org/wiki/LAMP_(software_bundle)">LAMP server</a> but at the same time I want a desktop and all that comes with it.  I figured I&#8217;d be able to download the Desktop Edition and sort it out later.  I am happy to report I was correct, but I learned a little on the way.  Here&#8217;s how you do it.</p>
<p>First off I <a href="http://www.ubuntu.com/getubuntu/download">downloaded</a> and installed Ubuntu Desktop Edition.  That went very smoothly, however I was a little concerned that although I created a user account during installation I wasn&#8217;t asked to specify a root password.  All became clear after I discovered that they use <a href="https://help.ubuntu.com/community/RootSudo">sudo instead</a> - in fact there is actually no root account by default.</p>
<p>This is also the first time I&#8217;ve used a <a href="http://www.debian.org/">Debian</a> based distribution.  Only now can I see why people have been banging on about apt-get and how slick it is.</p>
<p><code>sudo apt-get install apache2</code></p>
<p>As simple as that.  Done.  Apache 2 is now installed and ready to use.  Amazing.</p>
<p><code>sudo apt-get install php5<br />
sudo /etc/init.d/apache2 restart</code></p>
<p>Same for php5.  Wow.</p>
<p><code>sudo apt-get install mysql-server<br />
sudo apt-get install libapache2-mod-auth-mysql<br />
sudo apt-get install php5-mysql<br />
sudo apt-get install phpmyadmin</code></p>
<p>You get the picture&#8230;</p>
<p>I just had to edit php.ini to enable the extension.</p>
<p><code>gksudo gedit /etc/php5/apache2/php.ini<br />
extension=mysql.so</code></p>
<p>Restart Apache again and I&#8217;m done.</p>
<p>My gob is still smacked.</p>
<p>I&#8217;m still adjusting to this whole no root account business, but at first glance Ubuntu gets the thumbs up from me.</p>
<p><em>See my follow-up post <a href="http://www.spoffle.com/technical/follow-up-on-my-ubuntu-lamp-how-to/">here</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/feed/</wfw:commentRss>
		<feedburner:origLink>http://www.spoffle.com/technical/how-to-set-up-lamp-on-ubuntu-desktop-edition/</feedburner:origLink></item>
	</channel>
</rss>
