<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Steve Whiteley's Blog</title>
	<atom:link href="http://blog.stevewhiteley.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stevewhiteley.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Wed, 18 Feb 2009 12:09:13 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='blog.stevewhiteley.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/85169669bd34410be1364851cd659ae9?s=96&#038;d=http://s2.wp.com/i/buttonw-com.png</url>
		<title>Steve Whiteley's Blog</title>
		<link>http://blog.stevewhiteley.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.stevewhiteley.com/osd.xml" title="Steve Whiteley&#8217;s Blog" />
	<atom:link rel='hub' href='http://blog.stevewhiteley.com/?pushpress=hub'/>
		<item>
		<title>PHP last day of a month</title>
		<link>http://blog.stevewhiteley.com/2009/02/18/php-last-day-of-a-month/</link>
		<comments>http://blog.stevewhiteley.com/2009/02/18/php-last-day-of-a-month/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 11:57:13 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.stevewhiteley.com/?p=15</guid>
		<description><![CDATA[This is a nice little snippet to get the first and last dates of a particular month
$Month = 2;
$Year = 2009;
if($Month &#60; 10 &#38;&#38; strlen($Month) == 1)
{
$Month = "0".$Month;
}
$MonthStart = $Year."-".$Month."-01"; // first day of a month
$MonthEnd = $Year."-".$Month."-".date("t", strtotime($MonthStart)); // last day of a month
This does come with the caveate, however, that there is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.stevewhiteley.com&blog=6534568&post=15&subd=stevewhiteley&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>This is a nice little snippet to get the first and last dates of a particular month</p>
<pre>$Month = 2;
$Year = 2009;
if($Month &lt; 10 &amp;&amp; strlen($Month) == 1)
{
$Month = "0".$Month;
}
$MonthStart = $Year."-".$Month."-01"; // first day of a month
$MonthEnd = $Year."-".$Month."-".date("t", strtotime($MonthStart)); // last day of a month</pre>
<p>This does come with the caveate, however, that there is no validation on $Year and $Month. If you have $Month = 15 or $Year = &#8220;house&#8221; then you will have problems, a more advanced method is a topic for another post perhaps! <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stevewhiteley.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stevewhiteley.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stevewhiteley.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stevewhiteley.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stevewhiteley.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stevewhiteley.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stevewhiteley.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stevewhiteley.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stevewhiteley.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stevewhiteley.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.stevewhiteley.com&blog=6534568&post=15&subd=stevewhiteley&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.stevewhiteley.com/2009/02/18/php-last-day-of-a-month/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28f4aee6b7e84c5a0c6fe49f1f8bcac1?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">stevewhiteley</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Causes Internet Explorer cannot open the Internet site</title>
		<link>http://blog.stevewhiteley.com/2009/02/13/javascript-causes-internet-explorer-cannot-open-the-internet-site/</link>
		<comments>http://blog.stevewhiteley.com/2009/02/13/javascript-causes-internet-explorer-cannot-open-the-internet-site/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 14:46:40 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[ie blank page error]]></category>
		<category><![CDATA[ie error]]></category>

		<guid isPermaLink="false">http://blog.stevewhiteley.com/?p=7</guid>
		<description><![CDATA[A nightmare situation&#8230; Your page works fine in most browsers, you test it in Internet Explorer 7 and just as it looks like everything is working fine you get this:
Bam! Right in the kisser!
I narrowed down the problem down to this:
&#60;script type=&#8221;text/javascript&#8221;&#62;
jQuery(&#8216;#Calendar1 *&#8217;).tooltip();
&#60;/script&#62;
Which is a jQuery plugin for adding tooltips. Its very good, but it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.stevewhiteley.com&blog=6534568&post=7&subd=stevewhiteley&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>A nightmare situation&#8230; Your page works fine in most browsers, you test it in Internet Explorer 7 and just as it looks like everything is working fine you get this:</p>
<div id="attachment_11" class="wp-caption aligncenter" style="width: 507px"><img class="size-full wp-image-11" title="error-message2" src="http://stevewhiteley.files.wordpress.com/2009/02/error-message2.png?w=497&#038;h=132" alt="Internet Explorer cannot open the Internet site" width="497" height="132" /><p class="wp-caption-text">Internet Explorer cannot open the Internet site</p></div>
<p>Bam! Right in the kisser!</p>
<p>I narrowed down the problem down to this:</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
jQuery(&#8216;#Calendar1 *&#8217;).tooltip();<br />
&lt;/script&gt;</p>
<p>Which is a <a title="jQuery" href="http://jquery.com" target="_blank">jQuery </a>plugin for adding <a title="jQuery Tool Tips" href="http://plugins.jquery.com/project/Tooltip" target="_blank">tooltips</a>. Its very good, but it looked like IE doesn&#8217;t like it!</p>
<p>Don&#8217;t despair though, it is just that IE does not like being rushed, adding an event handler to make the function wait until the entire page is ready fixes the problem</p>
<p>&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
jQuery(document).ready(function () {<br />
jQuery(&#8216;#Calendar1 *&#8217;).tooltip();<br />
});<br />
&lt;/script&gt;</p>
<p>Moral of the story, don&#8217;t rush IE! and keep your javascript unobtrusive!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stevewhiteley.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stevewhiteley.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stevewhiteley.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stevewhiteley.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stevewhiteley.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stevewhiteley.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stevewhiteley.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stevewhiteley.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stevewhiteley.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stevewhiteley.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.stevewhiteley.com&blog=6534568&post=7&subd=stevewhiteley&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.stevewhiteley.com/2009/02/13/javascript-causes-internet-explorer-cannot-open-the-internet-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28f4aee6b7e84c5a0c6fe49f1f8bcac1?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">stevewhiteley</media:title>
		</media:content>

		<media:content url="http://stevewhiteley.files.wordpress.com/2009/02/error-message2.png" medium="image">
			<media:title type="html">error-message2</media:title>
		</media:content>
	</item>
		<item>
		<title>PHP tidy extension is loaded but not working</title>
		<link>http://blog.stevewhiteley.com/2009/02/13/php-tidy-extension-is-loaded-but-not-working/</link>
		<comments>http://blog.stevewhiteley.com/2009/02/13/php-tidy-extension-is-loaded-but-not-working/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 13:55:26 +0000</pubDate>
		<dc:creator>Steve</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[lib tidy]]></category>
		<category><![CDATA[php tidy]]></category>
		<category><![CDATA[red hat]]></category>

		<guid isPermaLink="false">http://blog.stevewhiteley.com/?p=3</guid>
		<description><![CDATA[The other day we had trouble getting PHP tidy to work on Red Hat Fedora Core 9. Especially frustrating was that we would get an error message like this one:
Fatal error:  Class &#8216;tidy&#8217; not found in Path/to/file.php on line 9
And of course this is made worse by the fact that extension_loaded(&#8220;tidy&#8221;) shows that the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.stevewhiteley.com&blog=6534568&post=3&subd=stevewhiteley&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<p>The other day we had trouble getting <a title="PHP Tidy" href="http://www.php.net/tidy" target="_blank">PHP tidy</a> to work on Red Hat Fedora Core 9. Especially frustrating was that we would get an error message like this one:</p>
<p><strong>Fatal error</strong>:  Class &#8216;tidy&#8217; not found in <strong>Path/to/file.php </strong>on line <strong>9</strong></p>
<p>And of course this is made worse by the fact that extension_loaded(&#8220;tidy&#8221;) shows that the Tidy extension is loaded! So the Tidy extension being loaded, but the class not existing was a bit puzzling to say the least.</p>
<p>The long and short of it was that we came up with this methodology for setting up the tidy extension on Red Hat:</p>
<ol>
<li>Run commad <strong>pecl install tidy</strong> to get the latest version of tidy</li>
<li>Run <strong>yum install libtidy</strong> to get the lib that the extension depends upon</li>
<li>Add the line <strong>extension=tidy.so</strong> to yo<span style="text-decoration:underline;">ur php.</span>ini (or a create a tidy.ini in your php extensions ini folder &#8211; possibly /etc/php.d/)</li>
<li>Run <strong>yum install php-tidy</strong> to install the extension that get tidy.php working together (This is probably the step that is missing if you are getting the above error)</li>
<li>Restart apache:  <strong>/etc/init.d/httpd graceful </strong> on our system</li>
</ol>
<p>And that was all there was to it! Not a very exciting blog post, but hopefully useful to someone <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/stevewhiteley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/stevewhiteley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/stevewhiteley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/stevewhiteley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/stevewhiteley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/stevewhiteley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/stevewhiteley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/stevewhiteley.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/stevewhiteley.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/stevewhiteley.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.stevewhiteley.com&blog=6534568&post=3&subd=stevewhiteley&ref=&feed=1" />]]></content:encoded>
			<wfw:commentRss>http://blog.stevewhiteley.com/2009/02/13/php-tidy-extension-is-loaded-but-not-working/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/28f4aee6b7e84c5a0c6fe49f1f8bcac1?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96" medium="image">
			<media:title type="html">stevewhiteley</media:title>
		</media:content>
	</item>
	</channel>
</rss>