<?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>klkl &#187; Internet</title>
	<atom:link href="http://klkl.co.uk/category/miscellaneous/internet/feed/" rel="self" type="application/rss+xml" />
	<link>http://klkl.co.uk</link>
	<description>it's easy to type</description>
	<lastBuildDate>Sun, 11 Apr 2010 13:40:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>HowTo: Mac OS X Flush DNS Cache</title>
		<link>http://klkl.co.uk/2010/04/11/howto-mac-os-x-flush-dns-cache/</link>
		<comments>http://klkl.co.uk/2010/04/11/howto-mac-os-x-flush-dns-cache/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 13:40:24 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[flush]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=257</guid>
		<description><![CDATA[<p>While playing with my /etc/hosts file for testing a new server setup I needed to flush my DNS cache. As ever, terminal came to my aid.</p>
<h4 style="padding-left: 30px;"><strong>dscacheutil -flushcache</strong></h4>
<p>Now all is well in the world of DNS.</p>
]]></description>
			<content:encoded><![CDATA[<p>While playing with my /etc/hosts file for testing a new server setup I needed to flush my DNS cache. As ever, terminal came to my aid.</p>
<h4 style="padding-left: 30px;"><strong>dscacheutil -flushcache</strong></h4>
<p>Now all is well in the world of DNS.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2010/04/11/howto-mac-os-x-flush-dns-cache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting to MySQL Over SSH</title>
		<link>http://klkl.co.uk/2010/03/21/connecting-to-mysql-over-ssh/</link>
		<comments>http://klkl.co.uk/2010/03/21/connecting-to-mysql-over-ssh/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 14:06:56 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=251</guid>
		<description><![CDATA[<p>The last couple of days I&#8217;ve been thinking about setting up a local copy of my websites on my laptop so that I can develop them before I make them live.</p>
<p>Last night I enabled PHP on the apache server built into Mac OSX on my new laptop and installed MySQL on it. I also set up some bash aliases to rsync commands so that I could synchronise the websites from the server to the laptop and back again.</p>
<p>Now that I had local copies of the sites that are synchronised it was time to turn my attention to synchronising the databases between the server and my local machine. I could of configured the server&#8217;s MySQL installation to allow remote connections, however, I did not want to do this for security reasons. I decided that I would connect to the MySQL server over SSH by forwarding a port on my local machine to a remote port on the server.</p>
<p>First I needed to create an SSH tunnel using the following command</p>
<p style="padding-left: 30px;">ssh -fNg -L 3307:127.0.0.1:3306 server.host.name<span id="more-251"></span></p>
<p>The options for SSH are</p>
<ul>
<li>f
<ul>
<li>Requests SSH to background so that you do not have to keep a terminal connected to the server open</li>
</ul>
</li>
<li>N
<ul>
<li>Does not execute a remote command (useful for just forwarding ports)</li>
</ul>
</li>
<li>g
<ul>
<li>Allows remote hosts to connect to local forwarded ports</li>
</ul>
</li>
<li>L
<ul>
<li>Specifies that a local port (3307) is forwarded to the given host (server.host.name) and port (3306)</li>
</ul>
</li>
</ul>
<p>I created an alias to that command for easy use in future but I&#8217;ll need to make sure the tunnel is active before trying to connect to the remote server.</p>
<p>Next its time to turn our attention to actually connecting to the remote MySQL server.</p>
<p style="padding-left: 30px;">mysql -h 127.0.0.1 -P 3307 -u username -p</p>
<p>The Options:</p>
<ul>
<li>h specifies the host to connect to (must be 127.0.0.1)</li>
<li>P specifies the port to connect to (your locally forwarded port)</li>
<li>u specifies the username to connect with</li>
<li>p will prompt you for your password (&#8211;password=passtext can be used to give the password)</li>
</ul>
<p>Thats if I wanted to connect to the remote MySQL server on the command line. The latest phpmyadmin has an option for syncronizing databases in which case you can put the above details and it will compare the databases and allow you to choose what to synchronise.</p>
]]></description>
			<content:encoded><![CDATA[<p>The last couple of days I&#8217;ve been thinking about setting up a local copy of my websites on my laptop so that I can develop them before I make them live.</p>
<p>Last night I enabled PHP on the apache server built into Mac OSX on my new laptop and installed MySQL on it. I also set up some bash aliases to rsync commands so that I could synchronise the websites from the server to the laptop and back again.</p>
<p>Now that I had local copies of the sites that are synchronised it was time to turn my attention to synchronising the databases between the server and my local machine. I could of configured the server&#8217;s MySQL installation to allow remote connections, however, I did not want to do this for security reasons. I decided that I would connect to the MySQL server over SSH by forwarding a port on my local machine to a remote port on the server.</p>
<p>First I needed to create an SSH tunnel using the following command</p>
<p style="padding-left: 30px;">ssh -fNg -L 3307:127.0.0.1:3306 server.host.name<span id="more-251"></span></p>
<p>The options for SSH are</p>
<ul>
<li>f
<ul>
<li>Requests SSH to background so that you do not have to keep a terminal connected to the server open</li>
</ul>
</li>
<li>N
<ul>
<li>Does not execute a remote command (useful for just forwarding ports)</li>
</ul>
</li>
<li>g
<ul>
<li>Allows remote hosts to connect to local forwarded ports</li>
</ul>
</li>
<li>L
<ul>
<li>Specifies that a local port (3307) is forwarded to the given host (server.host.name) and port (3306)</li>
</ul>
</li>
</ul>
<p>I created an alias to that command for easy use in future but I&#8217;ll need to make sure the tunnel is active before trying to connect to the remote server.</p>
<p>Next its time to turn our attention to actually connecting to the remote MySQL server.</p>
<p style="padding-left: 30px;">mysql -h 127.0.0.1 -P 3307 -u username -p</p>
<p>The Options:</p>
<ul>
<li>h specifies the host to connect to (must be 127.0.0.1)</li>
<li>P specifies the port to connect to (your locally forwarded port)</li>
<li>u specifies the username to connect with</li>
<li>p will prompt you for your password (&#8211;password=passtext can be used to give the password)</li>
</ul>
<p>Thats if I wanted to connect to the remote MySQL server on the command line. The latest phpmyadmin has an option for syncronizing databases in which case you can put the above details and it will compare the databases and allow you to choose what to synchronise.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2010/03/21/connecting-to-mysql-over-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac Firewall: Do You Want the Application Vuze.app to Accept Incoming Network Connections</title>
		<link>http://klkl.co.uk/2009/12/22/mac-firewall-do-you-want-the-application-vuze-app-to-accept-incoming-network-connections/</link>
		<comments>http://klkl.co.uk/2009/12/22/mac-firewall-do-you-want-the-application-vuze-app-to-accept-incoming-network-connections/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 16:37:15 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[solution]]></category>
		<category><![CDATA[vuze]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=240</guid>
		<description><![CDATA[<p>Recently I&#8217;ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.</p>
<p>The appropriate setting can be found under:</p>
<p style="padding-left: 30px;"><strong>System Preferences : Personal &gt; Security &gt; Firewall</strong></p>
<p>I have mine configured to &#8220;Set access for specific services and applications&#8221; which normally asks me if I want to allow an application to accept incoming connections<strong> </strong>the first time I run it and that&#8217;s normally the end of it. The trouble comes when you try and update certain applications using <strong>Software Update</strong>. I&#8217;m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.</p>
<p>The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.</p>
]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.</p>
<p>The appropriate setting can be found under:</p>
<p style="padding-left: 30px;"><strong>System Preferences : Personal &gt; Security &gt; Firewall</strong></p>
<p>I have mine configured to &#8220;Set access for specific services and applications&#8221; which normally asks me if I want to allow an application to accept incoming connections<strong> </strong>the first time I run it and that&#8217;s normally the end of it. The trouble comes when you try and update certain applications using <strong>Software Update</strong>. I&#8217;m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.</p>
<p>The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/12/22/mac-firewall-do-you-want-the-application-vuze-app-to-accept-incoming-network-connections/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic POP3 &amp; IMAP Connection Testing via Telnet</title>
		<link>http://klkl.co.uk/2009/12/15/basic-pop3-imap-connection-testing-via-telnet/</link>
		<comments>http://klkl.co.uk/2009/12/15/basic-pop3-imap-connection-testing-via-telnet/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 14:16:01 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[Mail]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[ssl]]></category>
		<category><![CDATA[telnet]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=237</guid>
		<description><![CDATA[<p><strong>To Test POP3</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 110 (xxx = mailserver)<br />
<span style="color: #008000;">+OK Hello there.</span><br />
user <strong>USERNAME</strong><br />
<span style="color: #008000;">+OK Password required.</span><br />
pass <strong>PASSWORD<br />
</strong><span style="color: #008000;">+OK logged in.</span><br />
stat<br />
<span style="color: #008000;">+OK (Information about your mail)</span><br />
quit<br />
<span style="color: #008000;">+OK Bye-bye.</span></p>
<p><span id="more-237"></span><strong>To Test IMAP</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 143<br />
<span style="color: #008000;">* OK (welcome message)</span><br />
a login <strong>USERNAME PASSWORD<br />
</strong><span style="color: #008000;">a OK login Ok.</span><br />
a examine inbox<br />
<span style="color: #008000;">(Information about mail)</span><br />
a logout<br />
<span style="color: #008000;">a OK LOGOUT completed</span></p>
<p><strong>To Test POP3 over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:995<br />
Commands as above</p>
<p><strong>To Test IMAP over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:993<br />
Commands as above</p>
]]></description>
			<content:encoded><![CDATA[<p><strong>To Test POP3</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 110 (xxx = mailserver)<br />
<span style="color: #008000;">+OK Hello there.</span><br />
user <strong>USERNAME</strong><br />
<span style="color: #008000;">+OK Password required.</span><br />
pass <strong>PASSWORD<br />
</strong><span style="color: #008000;">+OK logged in.</span><br />
stat<br />
<span style="color: #008000;">+OK (Information about your mail)</span><br />
quit<br />
<span style="color: #008000;">+OK Bye-bye.</span></p>
<p><span id="more-237"></span><strong>To Test IMAP</strong></p>
<p style="padding-left: 30px;">telnet <strong>xxx.xxx.xxx.xxx</strong> 143<br />
<span style="color: #008000;">* OK (welcome message)</span><br />
a login <strong>USERNAME PASSWORD<br />
</strong><span style="color: #008000;">a OK login Ok.</span><br />
a examine inbox<br />
<span style="color: #008000;">(Information about mail)</span><br />
a logout<br />
<span style="color: #008000;">a OK LOGOUT completed</span></p>
<p><strong>To Test POP3 over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:995<br />
Commands as above</p>
<p><strong>To Test IMAP over SSL</strong></p>
<p style="padding-left: 30px;">openssl s_client -connect <strong>xxx.xxx.xxx.xxx</strong>:993<br />
Commands as above</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/12/15/basic-pop3-imap-connection-testing-via-telnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing the Tilde (~) Character From the Address of Locally Hosted Sites on Mac OS X</title>
		<link>http://klkl.co.uk/2009/07/17/removing-the-tilde-character-from-the-address-of-locally-hosted-sites-on-mac-os-x/</link>
		<comments>http://klkl.co.uk/2009/07/17/removing-the-tilde-character-from-the-address-of-locally-hosted-sites-on-mac-os-x/#comments</comments>
		<pubDate>Fri, 17 Jul 2009 19:08:42 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[ln]]></category>
		<category><![CDATA[tilde]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=194</guid>
		<description><![CDATA[<p>I&#8217;ve been working on some sites locally on my Mac but by default the files are stored in a directory in the individuals user account called Sites and the address you&#8217;ve got to type into your browser is http://localhost/~username/etc&#8230; this annoyed me because I didn&#8217;t want to have to type the tilde character in the address and also that I had to have the files showing in a subdirectories of my user. I couldn&#8217;t be doing with it, I wanted to have addresses like &#8216;http://localhost/subdomain/&#8217; and the solution of course is to use symbolic links.</p>
<p><span id="more-194"></span></p>
<p>The way I did it was to have various directories in the /Users/username/Sites directory as is the normal set up but to have a symbolic link for each project that I wanted to have a better looking URL for so for example if my PHP My Admin was contained in the directory /Users/username/Sites/phpma then I would create a symbolic link to the directory /Library/WebServer/Documents/ using the command&#8230;</p>
<ul>
<li><strong>ln -s /Users/username/Sites/phpma /Library/WebServer/Documents/phpma</strong></li>
</ul>
<p>Et Voila&#8230; I can now use and bookmark a shorter and less visually offensive URL to the sites I&#8217;m working on.</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working on some sites locally on my Mac but by default the files are stored in a directory in the individuals user account called Sites and the address you&#8217;ve got to type into your browser is http://localhost/~username/etc&#8230; this annoyed me because I didn&#8217;t want to have to type the tilde character in the address and also that I had to have the files showing in a subdirectories of my user. I couldn&#8217;t be doing with it, I wanted to have addresses like &#8216;http://localhost/subdomain/&#8217; and the solution of course is to use symbolic links.</p>
<p><span id="more-194"></span></p>
<p>The way I did it was to have various directories in the /Users/username/Sites directory as is the normal set up but to have a symbolic link for each project that I wanted to have a better looking URL for so for example if my PHP My Admin was contained in the directory /Users/username/Sites/phpma then I would create a symbolic link to the directory /Library/WebServer/Documents/ using the command&#8230;</p>
<ul>
<li><strong>ln -s /Users/username/Sites/phpma /Library/WebServer/Documents/phpma</strong></li>
</ul>
<p>Et Voila&#8230; I can now use and bookmark a shorter and less visually offensive URL to the sites I&#8217;m working on.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/07/17/removing-the-tilde-character-from-the-address-of-locally-hosted-sites-on-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>getNullDate() Error When Installing Joomla</title>
		<link>http://klkl.co.uk/2009/01/10/getnulldate-error-when-installing-joomla/</link>
		<comments>http://klkl.co.uk/2009/01/10/getnulldate-error-when-installing-joomla/#comments</comments>
		<pubDate>Sat, 10 Jan 2009 21:34:21 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[configuration]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=134</guid>
		<description><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Joomla Logo" src="http://klkl.co.uk/joomla-logo.png" alt="Joomla Logo" width="248" height="246" /></p>
<p>I&#8217;ve been meaning to try <a title="Joomla" href="http://www.joomla.org" target="_blank">Joomla</a> for some time and a friend mentioning it last night was the impetus for me to give it a go. I downloaded the latest stable version just now and decided to give it a go.</p>
<p>I was very impressed by the installation script and how it guides you through the installation process with handy guidance, however, I feel it falls down in one area.<br />
<span id="more-134"></span><br />
On the penultimate installation screen there is an option to load default content into the database or previously saved data. This didn&#8217;t work for me and when I tried to go to the final screen of the installation I was greeted with the following errors&#8230;</p>
<p style="padding-left: 30px;"><strong>Notice: Undefined index: DBtype in /var/www/xxx/htdocs/joomla_directory/installer/models/model.php on line 702</strong></p>
<p style="padding-left: 30px;"><strong>Fatal error: Call to undefined method JException::getNullDate() in</strong><strong>/var/www/xxx/htdocs/joomla_directory/</strong><strong>installer/helper.php on line 290</strong></p>
<p>It took a bit of searching to figure it out but the problem lied with where joomla stores its configuration variables. At the second step of the installation there is a list of requirements one of which is write access to a file called &#8216;<strong>configuration.php&#8217; </strong>in Joomla&#8217;s root directory. I noticed there&#8217;s a sample configuration file called &#8216;<strong>configuration.php-dist</strong>&#8216; so I copied it and gave the webserver write access to the file and the installer&#8217;s check seemed happy with this.</p>
<p>It turns out that the webserver either needs write access to the folder to write its own configuration file or if you provided the file with write access then it must be blank. I used touch to create the file and made it writeable by the webserver and the installation finally worked.</p>
<p> <img src='http://klkl.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="Joomla Logo" src="http://klkl.co.uk/joomla-logo.png" alt="Joomla Logo" width="248" height="246" /></p>
<p>I&#8217;ve been meaning to try <a title="Joomla" href="http://www.joomla.org" target="_blank">Joomla</a> for some time and a friend mentioning it last night was the impetus for me to give it a go. I downloaded the latest stable version just now and decided to give it a go.</p>
<p>I was very impressed by the installation script and how it guides you through the installation process with handy guidance, however, I feel it falls down in one area.<br />
<span id="more-134"></span><br />
On the penultimate installation screen there is an option to load default content into the database or previously saved data. This didn&#8217;t work for me and when I tried to go to the final screen of the installation I was greeted with the following errors&#8230;</p>
<p style="padding-left: 30px;"><strong>Notice: Undefined index: DBtype in /var/www/xxx/htdocs/joomla_directory/installer/models/model.php on line 702</strong></p>
<p style="padding-left: 30px;"><strong>Fatal error: Call to undefined method JException::getNullDate() in</strong><strong>/var/www/xxx/htdocs/joomla_directory/</strong><strong>installer/helper.php on line 290</strong></p>
<p>It took a bit of searching to figure it out but the problem lied with where joomla stores its configuration variables. At the second step of the installation there is a list of requirements one of which is write access to a file called &#8216;<strong>configuration.php&#8217; </strong>in Joomla&#8217;s root directory. I noticed there&#8217;s a sample configuration file called &#8216;<strong>configuration.php-dist</strong>&#8216; so I copied it and gave the webserver write access to the file and the installer&#8217;s check seemed happy with this.</p>
<p>It turns out that the webserver either needs write access to the folder to write its own configuration file or if you provided the file with write access then it must be blank. I used touch to create the file and made it writeable by the webserver and the installation finally worked.</p>
<p> <img src='http://klkl.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2009/01/10/getnulldate-error-when-installing-joomla/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To: Tunnel Connections Over SSH</title>
		<link>http://klkl.co.uk/2008/12/30/how-to-tunnel-connections-over-ssh/</link>
		<comments>http://klkl.co.uk/2008/12/30/how-to-tunnel-connections-over-ssh/#comments</comments>
		<pubDate>Tue, 30 Dec 2008 19:24:07 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[port]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[tunnel]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=131</guid>
		<description><![CDATA[<p>I&#8217;ve been doing some work involving an application that needs to query databases on separate servers however one of the servers will only accept mysql connections locally so the way round it is to forward connections from a port on one system to a port on a remote system. That way the connection to the remote database will appear as though it originated locally and be accepted.</p>
<p>To set up a tunneled connection you issue the following command on any client:</p>
<p style="padding-left: 30px;"><strong>ssh -fNg -L 3307:127.0.0.1:3306 myuser@remotehost.com</strong></p>
<p>The first command tells ssh to log in to remotehost.com as myuser, go into the background (-f) and not execute any remote command (-N), and set up port-forwarding (-L localport:localhost:remoteport ). In this case, we forward port 3307 on localhost to port 3306 on remotehost.com.</p>
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing some work involving an application that needs to query databases on separate servers however one of the servers will only accept mysql connections locally so the way round it is to forward connections from a port on one system to a port on a remote system. That way the connection to the remote database will appear as though it originated locally and be accepted.</p>
<p>To set up a tunneled connection you issue the following command on any client:</p>
<p style="padding-left: 30px;"><strong>ssh -fNg -L 3307:127.0.0.1:3306 myuser@remotehost.com</strong></p>
<p>The first command tells ssh to log in to remotehost.com as myuser, go into the background (-f) and not execute any remote command (-N), and set up port-forwarding (-L localport:localhost:remoteport ). In this case, we forward port 3307 on localhost to port 3306 on remotehost.com.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2008/12/30/how-to-tunnel-connections-over-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easy FAQ, a New Wordpress Plugin for Frequently Asked Questions</title>
		<link>http://klkl.co.uk/2008/11/05/easy-faq-a-new-wordpress-plugin-for-frequently-asked-questions/</link>
		<comments>http://klkl.co.uk/2008/11/05/easy-faq-a-new-wordpress-plugin-for-frequently-asked-questions/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 08:58:06 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Blog Stuff]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[album]]></category>
		<category><![CDATA[FAQ]]></category>
		<category><![CDATA[frequently asked questions]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress plugin]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=112</guid>
		<description><![CDATA[<p style="text-align: justify;">I&#8217;ve created a Wordpress plugin to create and manage lists of frequently asked questions. Currently its a work in progress but you can download the beta if you want a preview. If you want more information  or to download a copy then check out the Easy FAQ page above.</p>
<p style="text-align: justify;"><strong>Screenshot:</strong></p>
<p style="text-align: justify;"><a href="http://klkl.co.uk/wp-content/uploads/2008/11/faqscreenshot1.png"><img class="size-medium wp-image-102 aligncenter" title="easyFAQ interface" src="http://klkl.co.uk/wp-content/uploads/2008/11/faqscreenshot1-300x190.png" alt="easyFAQ interface" width="300" height="190" /></a></p>
]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">I&#8217;ve created a Wordpress plugin to create and manage lists of frequently asked questions. Currently its a work in progress but you can download the beta if you want a preview. If you want more information  or to download a copy then check out the Easy FAQ page above.</p>
<p style="text-align: justify;"><strong>Screenshot:</strong></p>
<p style="text-align: justify;"><a href="http://klkl.co.uk/wp-content/uploads/2008/11/faqscreenshot1.png"><img class="size-medium wp-image-102 aligncenter" title="easyFAQ interface" src="http://klkl.co.uk/wp-content/uploads/2008/11/faqscreenshot1-300x190.png" alt="easyFAQ interface" width="300" height="190" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2008/11/05/easy-faq-a-new-wordpress-plugin-for-frequently-asked-questions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UnderU.Com Involved In Phishing Scam</title>
		<link>http://klkl.co.uk/2008/08/05/underucom-involved-in-phishing-scam/</link>
		<comments>http://klkl.co.uk/2008/08/05/underucom-involved-in-phishing-scam/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 17:39:58 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[aliases]]></category>
		<category><![CDATA[bank]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[lloyds TSB]]></category>
		<category><![CDATA[Phishing]]></category>
		<category><![CDATA[scam]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=43</guid>
		<description><![CDATA[<p>One of the ways I <span style="text-decoration: line-through;">like</span> love to combat spam is by using email aliases. Basically I have one <strong>real</strong> email address that <strong>I do not</strong> give out to people but that I use to check my email with my provider. Then what I do is create any number of virtual or alias email addresses in my provider&#8217;s admin interface. So the scenario is that everytime I need to provide an email address for membership or to interact with a company I create a new email address (alias) for them and then give them that address. The beauty is that I only have to check one address and all my mail from all of those alias addresses gets sent to it automatically.</p>
<p>So if I ever get spam then I know exactly where it&#8217;s come from because each company / person has their own email address alias. It&#8217;s easy to stop them too, just delete the alias and no more spam! Not only that but the company or person who either spammed or allowed you to be spammed has just lost some credibility with you.<span id="more-43"></span></p>
<p>I got a Lloyds TSB phishing email this morning. I expect that you know what phishing emails are all about. I wasn&#8217;t fooled for an instant but I was interested in how they expected to trick people. The contents of the email were poorly coded HTML with images that were sourced from the lloydstsb.com site itself and an ugly link that blatantly was not kosher.</p>
<p>The email was sent to &#8216;undisclosed recipients&#8217; a flaw in my plan you might think, not a problem, a quick look at the headers revealed that the email was sent to underu@mydomain.co.uk (I like to use aliases that are the company names themselves). This was the email alias I set up for www.underu.com the underwear site for men, when I shopped with them in the past.</p>
<p>I don&#8217;t know how my email address got from them to the attacker and I&#8217;m away from home at the moment. When I get back I&#8217;ll be in touch with UnderU and ask how my email address and who knows what other information could of been abused. I&#8217;ll update the post if / when they respond.</p>
]]></description>
			<content:encoded><![CDATA[<p>One of the ways I <span style="text-decoration: line-through;">like</span> love to combat spam is by using email aliases. Basically I have one <strong>real</strong> email address that <strong>I do not</strong> give out to people but that I use to check my email with my provider. Then what I do is create any number of virtual or alias email addresses in my provider&#8217;s admin interface. So the scenario is that everytime I need to provide an email address for membership or to interact with a company I create a new email address (alias) for them and then give them that address. The beauty is that I only have to check one address and all my mail from all of those alias addresses gets sent to it automatically.</p>
<p>So if I ever get spam then I know exactly where it&#8217;s come from because each company / person has their own email address alias. It&#8217;s easy to stop them too, just delete the alias and no more spam! Not only that but the company or person who either spammed or allowed you to be spammed has just lost some credibility with you.<span id="more-43"></span></p>
<p>I got a Lloyds TSB phishing email this morning. I expect that you know what phishing emails are all about. I wasn&#8217;t fooled for an instant but I was interested in how they expected to trick people. The contents of the email were poorly coded HTML with images that were sourced from the lloydstsb.com site itself and an ugly link that blatantly was not kosher.</p>
<p>The email was sent to &#8216;undisclosed recipients&#8217; a flaw in my plan you might think, not a problem, a quick look at the headers revealed that the email was sent to underu@mydomain.co.uk (I like to use aliases that are the company names themselves). This was the email alias I set up for www.underu.com the underwear site for men, when I shopped with them in the past.</p>
<p>I don&#8217;t know how my email address got from them to the attacker and I&#8217;m away from home at the moment. When I get back I&#8217;ll be in touch with UnderU and ask how my email address and who knows what other information could of been abused. I&#8217;ll update the post if / when they respond.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2008/08/05/underucom-involved-in-phishing-scam/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Daylight Savings Error When Dealing With Timestamps</title>
		<link>http://klkl.co.uk/2008/07/10/php-daylight-savings-error-when-dealing-with-timestamps/</link>
		<comments>http://klkl.co.uk/2008/07/10/php-daylight-savings-error-when-dealing-with-timestamps/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 20:44:11 +0000</pubDate>
		<dc:creator>klkl</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Kquestion]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[BST]]></category>
		<category><![CDATA[DST]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Timestamp]]></category>

		<guid isPermaLink="false">http://klkl.co.uk/?p=42</guid>
		<description><![CDATA[<p>Last night I was working on determining how long a user had been logged into a PHP application but was having a problem with subtracting timestamps and this is how I solved it.</p>
<p>I was storing two timestamps (as a UNIX timestamp) in the database. One designating the date-time the user logged into the application and the other the date-time of the last activity the user performed. Because I was using UNIX timestamps, which are just the number of seconds sine the UNIX epoch, I subtracted one from the other and used that difference as the input to the PHP function date().</p>
<p>I couldn&#8217;t for the life of me work out why the date function was saying that I was logged in for an hour longer than I should have been and it was driving me crazy. It turns out that the reason was that my timezone locale setting in PHP is &#8216;Europe/London&#8217; and that this causes the date function to adjust for British Summer Time (GMT + 1) thus when I used my timestamp difference in the date() function it translated the difference into a readable format but also added an extra hour.</p>
<p>The solution is to use gmdate() which is identical to the date() function except that the time returned is in Grenwich Mean Time format.</p>
]]></description>
			<content:encoded><![CDATA[<p>Last night I was working on determining how long a user had been logged into a PHP application but was having a problem with subtracting timestamps and this is how I solved it.</p>
<p>I was storing two timestamps (as a UNIX timestamp) in the database. One designating the date-time the user logged into the application and the other the date-time of the last activity the user performed. Because I was using UNIX timestamps, which are just the number of seconds sine the UNIX epoch, I subtracted one from the other and used that difference as the input to the PHP function date().</p>
<p>I couldn&#8217;t for the life of me work out why the date function was saying that I was logged in for an hour longer than I should have been and it was driving me crazy. It turns out that the reason was that my timezone locale setting in PHP is &#8216;Europe/London&#8217; and that this causes the date function to adjust for British Summer Time (GMT + 1) thus when I used my timestamp difference in the date() function it translated the difference into a readable format but also added an extra hour.</p>
<p>The solution is to use gmdate() which is identical to the date() function except that the time returned is in Grenwich Mean Time format.</p>
]]></content:encoded>
			<wfw:commentRss>http://klkl.co.uk/2008/07/10/php-daylight-savings-error-when-dealing-with-timestamps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
