<?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>John Hunt&#039;s web log &#187; Programming</title>
	<atom:link href="http://john-hunt.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://john-hunt.com</link>
	<description>Linux, open source, development, coding, beer and other stuff</description>
	<lastBuildDate>Fri, 27 Aug 2010 06:37:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>MySQL 5 and old clients (like php4)</title>
		<link>http://john-hunt.com/2009/08/04/mysql-5-and-old-clients-like-php4/</link>
		<comments>http://john-hunt.com/2009/08/04/mysql-5-and-old-clients-like-php4/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 03:38:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://john-hunt.com/?p=175</guid>
		<description><![CDATA[Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /blah/somepage.php on line 123 The reason for this warning is because PHP4 can&#8217;t communicate with a MySQL5 server unless it&#8217;s using old passwords (set by using the OLD_PASSWORD() function below.) There are two simple ways to fix this. The [...]]]></description>
			<content:encoded><![CDATA[<p><code>Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /blah/somepage.php on line 123</code></p>
<p>The reason for this warning is because PHP4 can&#8217;t communicate with a MySQL5 server unless it&#8217;s using old passwords (set by using the OLD_PASSWORD() function below.)</p>
<p>There are two simple ways to fix this. The first would be to upgrade your version of php. Unless you *really* need php4 (or below?!) upgrade! I&#8217;m not sure php4 is supported any more and should be considered a security risk. If you can&#8217;t upgrade, just do this in your database:</p>
<p><code>update mysql.user set password=OLD_PASSWORD('thepassword') where user = 'theusername';</code><br />
and:<br />
<code>flush privileges;</code></p>
<p>This should do the trick. Be warned, if you issue any GRANT statements after this you will have to update mysql.user again.</p>
]]></content:encoded>
			<wfw:commentRss>http://john-hunt.com/2009/08/04/mysql-5-and-old-clients-like-php4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto_increment fun!</title>
		<link>http://john-hunt.com/2009/07/14/auto_increment-fun/</link>
		<comments>http://john-hunt.com/2009/07/14/auto_increment-fun/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 07:50:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://john-hunt.com/?p=166</guid>
		<description><![CDATA[Discovered some fun things in MySQL today.. Set the variable @id to 0: SET @id = 0; Update the column id to be id + 1 &#8211; this will re-index your id column in one fell swoop. Very nice: UPDATE tblname SET id = (@id := @id + 1); Set the first value for an [...]]]></description>
			<content:encoded><![CDATA[<p>Discovered some fun things in MySQL today..</p>
<p>Set the variable @id to 0:<br />
<code>SET @id = 0;</code></p>
<p>Update the column id to be id + 1 &#8211; this will re-index your id column in one fell swoop. Very nice:<br />
<code>UPDATE tblname SET id = (@id := @id + 1);</code></p>
<p>Set the first value for an auto_increment column:<br />
<code>ALTER TABLE tblname AUTO_INCREMENT = 196;</code><br />
(this won&#8217;t work if there are rows with a higher value already in the table)</p>
<p>All in all, a few nice bits and pieces for cleaning up your tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://john-hunt.com/2009/07/14/auto_increment-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP-Clearsilver installation guide for Ubuntu/Debian</title>
		<link>http://john-hunt.com/2008/03/27/php-clearsilver-installation-guide-for-ubuntudebian/</link>
		<comments>http://john-hunt.com/2008/03/27/php-clearsilver-installation-guide-for-ubuntudebian/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 06:39:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[clearsilver]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[templating]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://john-hunt.com/linux/2008/03/27/php-clearsilver-installation-guide-for-ubuntudebian/</guid>
		<description><![CDATA[I updated my php-clearsilver installation guide today after discovering it&#8217;s wrong in a few places. Fortunately, I don&#8217;t think anyone&#8217;s ever used it (apart from me today.) If you know what clearsilver is and you use php, you might find it interesting. Installing PHP Clearsilver module for apache on Ubuntu and Debian]]></description>
			<content:encoded><![CDATA[<p>I updated my php-clearsilver installation guide today after discovering it&#8217;s wrong in a few places. Fortunately, I don&#8217;t think anyone&#8217;s ever used it (apart from me today.)</p>
<p>If you know what clearsilver is and you use php, you might find it interesting.</p>
<p><a href="http://john-hunt.com/wiki/doku.php/clearsilver-php">Installing PHP Clearsilver module for apache on Ubuntu and Debian</a></p>
]]></content:encoded>
			<wfw:commentRss>http://john-hunt.com/2008/03/27/php-clearsilver-installation-guide-for-ubuntudebian/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Fluid horizontal list based highlighting menu with icons</title>
		<link>http://john-hunt.com/2008/02/28/fluid-horizontal-list-based-highlighting-menu-with-icons/</link>
		<comments>http://john-hunt.com/2008/02/28/fluid-horizontal-list-based-highlighting-menu-with-icons/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 02:18:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[fluid]]></category>
		<category><![CDATA[horizontal]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[li]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[markup]]></category>
		<category><![CDATA[menu]]></category>
		<category><![CDATA[ul]]></category>

		<guid isPermaLink="false">http://john-hunt.com/programming/2008/02/28/fluid-horizontal-list-based-highlighting-menu-with-icons/</guid>
		<description><![CDATA[No doubt it&#8217;s been done elsewhere, but I spent quite a while trying to get this one working. Basically I wanted a horizontal css menu with decent markup and no hacks. I also wanted to have nice icons for each item correctly vertically aligned. On top of that I wanted the whole thing to be [...]]]></description>
			<content:encoded><![CDATA[<p>No doubt it&#8217;s been done elsewhere, but I spent quite a while trying to get this one working. Basically I wanted a horizontal css menu with decent markup and no hacks. I also wanted to have nice icons for each item correctly vertically aligned. On top of that I wanted the whole thing to be fluid so it would look right at any text size. Unfortunately because of IE6&#8242;s lack of support for :hover on anything but links I needed to use containing spans for the text on each list item (doh!) I guess you could use javascript or something instead, but that&#8217;d be really horrid!</p>
<p>After a lot of hair pulling, I finally got it to work:<br />
<img src='http://john-hunt.com/wp-content/uploads/2008/02/menu1.png' alt='Menu' /></p>
<pre>
#navigation ul {
  margin:               0;
  padding:              0;
  background-color:     #eee;
  height:               2em;
  border-bottom:        1px solid #888;
}

#navigation li {
  float:                left;
  list-style-type:      none;
  border-right:         1px solid #888;
}

#navigation a {
  float:                left;
  margin:               0;
  background-repeat:    no-repeat;
  background-position:  5px 50%;
  text-decoration:      none;
  color:                #333;
}

#navigation .inner {
  padding:              0 .4em 0 26px;  /* Adjust based on the width of icon + 10px */
  display:              inline;
  line-height:          2em;
  vertical-align:       middle;
}

#navigation .contacts {
  background-image: url(/crm/resources/icons/contacts.png)
}

#navigation .activities {
  background-image: url(/crm/resources/icons/activities.png)
}

#navigation .reports {
  background-image: url(/crm/resources/icons/reports.png)
}

#navigation .utilities {
  background-image: url(/crm/resources/icons/utilities.png)
}

#navigation a:hover {
  background-color:         #fff;
}</pre>
<p>And here&#8217;s the HTML:</p>
<pre>
&lt;div id="navigation"&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;a href="" class="contacts"&gt;&lt;span class="inner"&gt;Contacts&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="" class="activities"&gt;&lt;span class="inner"&gt;Activities&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="" class="reports"&gt;&lt;span class="inner"&gt;Reports&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="" class="utilities"&gt;&lt;span class="inner"&gt;Utilities&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>*I got my icons from the fantastic <a href="http://www.famfamfam.com">FamFamFam</a> web site. This guy gives away loads of great icons for free. You might want to convert them to transparent gifs though as obviously IE6- won&#8217;t handle the transparency in the PNGs.</p>
<p>I&#8217;m no css expert, so if you can see anything silly in the css/markup or know of some way of improving this, please drop me a comment!</p>
]]></content:encoded>
			<wfw:commentRss>http://john-hunt.com/2008/02/28/fluid-horizontal-list-based-highlighting-menu-with-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
