<?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>Shawson&#039;s Code Blog &#187; php</title>
	<atom:link href="http://codeblog.shawson.co.uk/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://codeblog.shawson.co.uk</link>
	<description>development notes for my failing memory</description>
	<lastBuildDate>Tue, 15 May 2012 15:22:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Dummy Image Generator</title>
		<link>http://codeblog.shawson.co.uk/dummy-image-generator/</link>
		<comments>http://codeblog.shawson.co.uk/dummy-image-generator/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 14:39:57 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=749</guid>
		<description><![CDATA[&#8217;nuff said! http://dummyimage.com/ Related posts:Machine Key Generator Random Band Generator!


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/machine-key-generator/' rel='bookmark' title='Machine Key Generator'>Machine Key Generator</a></li>
<li><a href='http://codeblog.shawson.co.uk/random-band-generator/' rel='bookmark' title='Random Band Generator!'>Random Band Generator!</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>&#8217;nuff said!  <a href="http://dummyimage.com/">http://dummyimage.com/</a></p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/machine-key-generator/' rel='bookmark' title='Machine Key Generator'>Machine Key Generator</a></li>
<li><a href='http://codeblog.shawson.co.uk/random-band-generator/' rel='bookmark' title='Random Band Generator!'>Random Band Generator!</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/dummy-image-generator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</title>
		<link>http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/</link>
		<comments>http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 11:39:30 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=586</guid>
		<description><![CDATA[I recently noticed an issue on this very blog and a couple i have hosted on this server when people just hit submit on the comment form without entering anything into the comment field- i would get a 500 server error back. I spent ages googling figuring it was some kind of config error on [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/' rel='bookmark' title='WordPress import from WordPress.org &#8211; 500 Server Errors &amp; Timeout&#8217;s!'>WordPress import from WordPress.org &#8211; 500 Server Errors &#038; Timeout&#8217;s!</a></li>
<li><a href='http://codeblog.shawson.co.uk/my-shiny-new-blog/' rel='bookmark' title='My shiny new blog'>My shiny new blog</a></li>
<li><a href='http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/' rel='bookmark' title='Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI'>Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I recently noticed an issue on this very blog and a couple i have hosted on this server when people just hit submit on the comment form without entering anything into the comment field- i would get a 500 server error back.</p>
<p><img class="alignright size-medium  wp-image-587" title="error_pages" src="http://www.shawson.co.uk/codeblog/wp-content/uploads/2010/06/error_pages-300x227.jpg" alt="error_pages" width="300" height="227" />I spent ages googling figuring it was some kind of config error on the server as it happened across all of the wordpress blogs on this server- I eventually found it wasn&#8217;t an error at all- The skins used across these blogs didn&#8217;t seem to validate the forms so it was falling back to wordpress which was returning an error like &#8220;Error: please type a comment.&#8221;- however IIS seemed to be intercepting this as a full error and rendering a 500 error- the solution was simple!  Turn on detailed error&#8217;s.  Obviously this isn&#8217;t good on a production box running dot net, but for PHP you can control the error reporting from within the php.ini file anyway, so this just makes sure IIS doesn&#8217;t add an additional layer of error filtering confusing matters.</p>
<p><strong>Update: </strong>Thanks to <a href="http://www.ksingla.net/">Kanwaljeet Singla</a> on the comments for pointing out a better fix for this as detailed on <a href="http://blogs.iis.net/kehand/archive/2009/08/09/php-and-custom-error-pages.aspx">Kern Handa&#8217;s blog here</a>.  This can basically be fixed easily by setting a web config entry to tell IIS to let errors pass through, like so;</p>
<pre class="brush: xml">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;configuration&gt;
    &lt;system.webServer&gt;
        &lt;httpErrors existingResponse=&quot;PassThrough&quot; /&gt;
    &lt;/system.webServer&gt;
&lt;/configuration&gt;
</pre>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/' rel='bookmark' title='WordPress import from WordPress.org &#8211; 500 Server Errors &amp; Timeout&#8217;s!'>WordPress import from WordPress.org &#8211; 500 Server Errors &#038; Timeout&#8217;s!</a></li>
<li><a href='http://codeblog.shawson.co.uk/my-shiny-new-blog/' rel='bookmark' title='My shiny new blog'>My shiny new blog</a></li>
<li><a href='http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/' rel='bookmark' title='Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI'>Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI</title>
		<link>http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/</link>
		<comments>http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/#comments</comments>
		<pubDate>Thu, 27 May 2010 21:17:00 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=562</guid>
		<description><![CDATA[I recently rebuilt a Windows 2008 server and set it up with PHP5 and FastCGI under IIS7 for a bunch of word press blogs. I came to the end of the install and was setting rights to the wp-content folders so people could upload attachments, but ran into some troubles.  I dunno if this changed [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/iis-7-permissions-application-pool-identity-user-accounts/' rel='bookmark' title='IIS 7 Permissions &#8211; Application Pool Identity User Accounts'>IIS 7 Permissions &#8211; Application Pool Identity User Accounts</a></li>
<li><a href='http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/' rel='bookmark' title='WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5'>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/' rel='bookmark' title='MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted'>MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I recently rebuilt a Windows 2008 server and set it up with PHP5 and FastCGI under IIS7 for a bunch of word press blogs. I came to the end of the install and was setting rights to the wp-content folders so people could upload attachments, but ran into some troubles.  I dunno if this changed because of Service Pack 2, but I found I now have to assign the rights, not to &#8220;Network Service&#8221; which is the Identity of the app pools, and not to &#8220;ISS_IUSRS&#8221; group, but to an account simply called &#8220;IUSR&#8221;.  I&#8217;m sure previously i just assigned permission to the network service account?  And surly IUSR would be a member of IIS_IUSR&#8217;s by default?  I dunno!  Anyway I had to use <a href="http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx" target="_blank">procmon </a>to monitor the requests and see which account was actually being used.</p>
<p>So to conclude;  You need to give modify permissions to the wp_content folder, to the IUSR user and the user your App Pool runs as (eg; &#8216;IIS APPPool\codeblog.shawson.co.uk&#8217;)</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/iis-7-permissions-application-pool-identity-user-accounts/' rel='bookmark' title='IIS 7 Permissions &#8211; Application Pool Identity User Accounts'>IIS 7 Permissions &#8211; Application Pool Identity User Accounts</a></li>
<li><a href='http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/' rel='bookmark' title='WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5'>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/' rel='bookmark' title='MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted'>MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>PHP Basics @ Smashing Magazine</title>
		<link>http://codeblog.shawson.co.uk/php-basics-smashing-magazine/</link>
		<comments>http://codeblog.shawson.co.uk/php-basics-smashing-magazine/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 15:19:11 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=514</guid>
		<description><![CDATA[I&#8217;ve not touched PHP for a couple of years now and everytime I have to come back to pimp out a wordpress theme or write something simple which can consume a dot net web service or something else quick and dirty in php, its always the basic syntactical stuff that I find I&#8217;ve forgotten (seriously.. [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/' rel='bookmark' title='WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5'>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve not touched PHP for a couple of years now and everytime I have to come back to pimp out a wordpress theme or write something simple which can consume a dot net web service or something else quick and dirty in php, its always the basic syntactical stuff that I find I&#8217;ve forgotten (seriously.. a full stop to concatinate a string!?) &#8211; anyway; for those occasions, here is a handy article; <a href="http://www.smashingmagazine.com/2010/04/15/php-what-you-need-to-know-to-play-with-the-web/">www.smashingmagazine.com/2010/04/15/php-what-you-need-to-know-to-play-with-the-web/</a> </p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/' rel='bookmark' title='WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5'>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/php-basics-smashing-magazine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress import from WordPress.org &#8211; 500 Server Errors &amp; Timeout&#8217;s!</title>
		<link>http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/</link>
		<comments>http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/#comments</comments>
		<pubDate>Tue, 04 Aug 2009 20:44:40 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[FastCGI]]></category>
		<category><![CDATA[import]]></category>
		<category><![CDATA[timeout]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/?p=332</guid>
		<description><![CDATA[I&#8217;ve recently setup a wordpress blog to use when we&#8217;re on holiday to post pictures and let people know how we&#8217;re getting on. I had an existing hosted blog up at shawandtashinjapan.wordpress.com which I wanted to import to my new self hosted blog, but ran into a whole world of pain while trying to run [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/' rel='bookmark' title='WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5'>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</a></li>
<li><a href='http://codeblog.shawson.co.uk/move-from-blogenginenet-to-wordpress-271/' rel='bookmark' title='Move from BlogEngine.net to WordPress 2.7.1!'>Move from BlogEngine.net to WordPress 2.7.1!</a></li>
<li><a href='http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/' rel='bookmark' title='Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI'>Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve recently setup a wordpress blog to use when we&#8217;re on holiday to post pictures and let people know how we&#8217;re getting on.  I had an existing hosted blog up at <a href="http://shawandtashinjapan.wordpress.com" target="_blank">shawandtashinjapan.wordpress.com</a> which I wanted to import to my new self hosted blog, but ran into a whole world of pain while trying to run the built in importer.  </p>
<p>I ran an export from the wordpress.org hosted blog which gave me an xml file which contained wordpresses own variant of rss.  I then selected import from my new wordpress&#8217;s tools menu and gave it the xml file- all went well but when i asked it to download the attachments it all started to go to shit!</p>
<p>There were two main issues which i had to fix- the first was wordpress goes mental when it hits a 302 redirect when trying to grab an image, but there is a fix available for the download function in wordpress;</p>
<p>From : <a href="http://en.forums.wordpress.com/topic/downloading-images-for-import?replies=4">http://en.forums.wordpress.com/topic/downloading-images-for-import?replies=4</a></p>
<pre class="brush: php">
1052c1052
&lt; //ini_set(&quot;display_errors&quot;, true);
---
&gt;
1061,1069c1061
&lt; $response = wp_remote_request($url, $options);
&lt; $headers = wp_remote_retrieve_headers($response);
&lt;
&lt; $cd = (string)$response[&#039;response&#039;][&#039;code&#039;];
&lt;
&lt; if ($cd == &#039;301&#039;) {
&lt; $response = wp_remote_request($headers[&#039;location&#039;], $options);
&lt; $headers = wp_remote_retrieve_headers($response);
&lt; }
---
&gt; $response = wp_remote_request($url, $options);
1074c1066
&lt; //$headers = wp_remote_retrieve_headers( $response );
---
&gt; $headers = wp_remote_retrieve_headers( $response );
1077d1068
&lt;
</pre>
<p>
Then i&#8217;m hit with timeouts coming from the FastCGI module- I&#8217;m running PHP 5.2 under IIS7 on Windows 2008 Web Edition- the error I was now getting when trying to run the import was;
</p>
<blockquote><p>The FastCGI process exceeded configured activity timeout</p></blockquote>
<p>
I found the fix for this one here: <a href="http://forums.iis.net/t/1076662.aspx">http://forums.iis.net/t/1076662.aspx</a>.  It was down to the FastCGI module timeout being hit, so it was just a matter of increasing that from the command line i executed;
</p>
<pre class="brush: php">
%windir%\system32\inetsrv\appcmd set config -section:system.webServer/fastCgi /[fullPath=&#039;C:\php5\php-cgi.exe&#039;].activityTimeout:600
</pre>
<p>In the end, I STILL didn&#8217;t get all the images over as some of them were quite large and the wordpress file server timed out while the script was trying to grab them, but i thought i would post this none the less, to save anyone else having to experience the evening i just had.</p>
<p>ergh&#8230;</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/wordpress-500-error-when-submitting-a-blank-comment-form-under-iis7-and-php5/' rel='bookmark' title='WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5'>WordPress 500 Error when submitting a blank comment form under IIS7 and PHP5</a></li>
<li><a href='http://codeblog.shawson.co.uk/move-from-blogenginenet-to-wordpress-271/' rel='bookmark' title='Move from BlogEngine.net to WordPress 2.7.1!'>Move from BlogEngine.net to WordPress 2.7.1!</a></li>
<li><a href='http://codeblog.shawson.co.uk/permissions-problems-with-wordpress-on-php5iis7-windows-server-2008-sp2-with-fastcgi/' rel='bookmark' title='Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI'>Permissions problems with WordPress on PHP5/IIS7 (Windows Server 2008 SP2) with FastCGI</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Move from BlogEngine.net to WordPress 2.7.1!</title>
		<link>http://codeblog.shawson.co.uk/move-from-blogenginenet-to-wordpress-271/</link>
		<comments>http://codeblog.shawson.co.uk/move-from-blogenginenet-to-wordpress-271/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 21:41:55 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblogwp/?p=57</guid>
		<description><![CDATA[I&#8217;m a .net developer by day, so am always keen to use .net technologies where ever possible.  For the past few months I&#8217;ve been persevering with BlogEngine.net, a dot net blogging platform which I run on my Windows 2k8 IIS7 box from home, however I can do it no more!  I&#8217;ve found myself looking on [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/my-shiny-new-blog/' rel='bookmark' title='My shiny new blog'>My shiny new blog</a></li>
<li><a href='http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/' rel='bookmark' title='WordPress import from WordPress.org &#8211; 500 Server Errors &amp; Timeout&#8217;s!'>WordPress import from WordPress.org &#8211; 500 Server Errors &#038; Timeout&#8217;s!</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/' rel='bookmark' title='MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted'>MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a .net developer by day, so am always keen to use .net technologies where ever possible.  For the past few months I&#8217;ve been persevering with BlogEngine.net, a dot net blogging platform which I run on my Windows 2k8 IIS7 box from home, however I can do it no more!  I&#8217;ve found myself looking on with envy at the features in the newer builds of WordPress as i struggle on with the various &#8220;quirks&#8221; of BlogEngine and finally decided I could no longer put up with it- I&#8217;ve made the switch to WordPress which I&#8217;ve used in the past and I have to say I&#8217;m pleasantly surprised- not only is it as good as i remember, but it&#8217;s come on leaps and bounds both feature and interface wise since I last used it.</p>
<p>To get WordPress up and running I had to setup PHP5, mySQL (and phpMyAdmin to save me the pain of mySQL command line syntax again) under IIS7 which I also found to be easy (all up and running within an hour!) following the guides over on the <a title="TrainSignal Training- Setting up WordPress on IIS7" href="http://www.trainsignaltraining.com/installing-wordpress-on-iis7/2008-10-06/" target="_blank">TrainSignal training website</a></p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/my-shiny-new-blog/' rel='bookmark' title='My shiny new blog'>My shiny new blog</a></li>
<li><a href='http://codeblog.shawson.co.uk/wordpress-import-from-wordpress-org-500-server-errors-timeouts/' rel='bookmark' title='WordPress import from WordPress.org &#8211; 500 Server Errors &amp; Timeout&#8217;s!'>WordPress import from WordPress.org &#8211; 500 Server Errors &#038; Timeout&#8217;s!</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/' rel='bookmark' title='MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted'>MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/move-from-blogenginenet-to-wordpress-271/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL 5 / phpMyAdmin Installation &#8211; root account not accepted</title>
		<link>http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/</link>
		<comments>http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 10:41:00 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[IIS]]></category>
		<category><![CDATA[mySQL]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/post.aspx?id=c6db69ec-ed89-4d3a-889a-e0f6305e3de4</guid>
		<description><![CDATA[I recently installed mysql 5 under Windows 2003, with phpMyAdmin running under IIS 6 and came across an issue trying to get phpMyAdmin to access the database- I found that the root credentials were&#8217;nt accepted. The error i receive was &#8220;#1251 &#8211; Client does not support authentication protocol requested by server; consider upgrading MySQL client&#8221; [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/mysql-command-line-setting-up-a-new-database-and-user/' rel='bookmark' title='MySQL Command Line &#8211; Setting up a new database and user'>MySQL Command Line &#8211; Setting up a new database and user</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-backup-restore/' rel='bookmark' title='MySQL Backup &amp; Restore'>MySQL Backup &#038; Restore</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-5-1-with-dotnet-claims-procedure-or-function-cannot-be-found-in-database/' rel='bookmark' title='MySQL 5.1 with DotNet claims Procedure or function &#8216;&lt;procedure-name&gt;&#8216; cannot be found in database &#8216;&lt;database-name&gt;&#8216;'>MySQL 5.1 with DotNet claims Procedure or function &#8216;<procedure-name>&#8216; cannot be found in database &#8216;<database-name>&#8216;</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>I recently installed mysql 5 under Windows 2003, with phpMyAdmin running under IIS 6 and came across an issue trying to get phpMyAdmin to access the database- I found that the root credentials were&#8217;nt accepted. The error i receive was</p>
<h2>&#8220;#1251 &#8211; Client does not support authentication protocol requested by server; consider upgrading MySQL client&#8221;</h2>
<p><span style="font-family: verdana; color: #000000; font-size: x-small;"> </span> Apparently this is to do with me using an older version of phpMyAdmin and how the passwords are encrypted- I found an article on <a href="http://www.webmasterworld.com/forum88/6114.htm" target="_blank">WebMasterWorld</a> detailing how to resolve it;</p>
<p>Login from the command line to your MySQL database;</p>
<pre class="brush: plain">
mysql -u root -h localhost -p
</pre>
<ul>
<li>-u lets you set the username to use, in this case I&#8217;m using the root account</li>
<li>-h sets the host- I&#8217;m logging in from the local machine so used localhost- I havn&#8217;t enabled root access from any remote machines</li>
<li>-p indicates that you will be supplying a password</li>
</ul>
<p>You will then be prompted the enter the password for your database.  Once you&#8217;re in, execute the following sql to update the password</p>
<pre class="brush: sql">
UPDATE mysql.user
SET password=OLD_PASSWORD(&#039;somepassword&#039;)
WHERE user=&#039;someuser&#039;;
AND host=&#039;somehost&#039;;
</pre>
<p>Once that&#8217;s done you will also want to flush the priviledges;</p>
<pre class="brush: sql">
flush privileges;
</pre>
<p>You can now safely quit the mysql client with &#8216;exit&#8217; and you are set!</p>
<p>This is also covered on the <a href="http://dev.mysql.com/doc/refman/5.0/en/old-client.html" target="_blank">mySQL documentation</a> site.</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/mysql-command-line-setting-up-a-new-database-and-user/' rel='bookmark' title='MySQL Command Line &#8211; Setting up a new database and user'>MySQL Command Line &#8211; Setting up a new database and user</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-backup-restore/' rel='bookmark' title='MySQL Backup &amp; Restore'>MySQL Backup &#038; Restore</a></li>
<li><a href='http://codeblog.shawson.co.uk/mysql-5-1-with-dotnet-claims-procedure-or-function-cannot-be-found-in-database/' rel='bookmark' title='MySQL 5.1 with DotNet claims Procedure or function &#8216;&lt;procedure-name&gt;&#8216; cannot be found in database &#8216;&lt;database-name&gt;&#8216;'>MySQL 5.1 with DotNet claims Procedure or function &#8216;<procedure-name>&#8216; cannot be found in database &#8216;<database-name>&#8216;</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/mysql-5-phpmyadmin-installation-root-account-not-accepted/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Google Code Highlighter</title>
		<link>http://codeblog.shawson.co.uk/google-code-highlighter/</link>
		<comments>http://codeblog.shawson.co.uk/google-code-highlighter/#comments</comments>
		<pubDate>Tue, 28 Oct 2008 12:25:00 +0000</pubDate>
		<dc:creator>shawson</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[C#.net]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[VB.net]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://www.shawson.co.uk/codeblog/post.aspx?id=1a0049fa-b77b-430a-9c31-88c9252c84e4</guid>
		<description><![CDATA[You may have noticed that the little snippets of code I&#8217;ve been dropping into these post&#8217;s suddenly got a bit swankier looking. This is down to a new javascript tool I found for use on blogs and the like, for highlighting code you post on your pages. Basically you download the zip file- unzip it [...]


Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/runaway-sharepoint-2003-indexing/' rel='bookmark' title='Runaway Sharepoint 2003 Indexing!'>Runaway Sharepoint 2003 Indexing!</a></li>
<li><a href='http://codeblog.shawson.co.uk/google-font-api/' rel='bookmark' title='Google Font API'>Google Font API</a></li>
<li><a href='http://codeblog.shawson.co.uk/asp-net-build-step-to-minify-and-obfuscate-your-sites-javascript-and-css/' rel='bookmark' title='Adding minification and obfuscation of your Javascript and CSS to your ASP.net build process using Yahoo YUI Compressor'>Adding minification and obfuscation of your Javascript and CSS to your ASP.net build process using Yahoo YUI Compressor</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that the little snippets of code I&#8217;ve been dropping into these post&#8217;s suddenly got a bit swankier looking.  This is down to a new javascript tool I found for use on blogs and the like, for highlighting code you post on your pages.</p>
<p>Basically you download the zip file- unzip it and copy the javascripts and css files over, then add a few lines of code to the head of your page;</p>
<p><textarea name="code" class="html"></p>
<link type="text/css" rel="stylesheet" href="css/SyntaxHighlighter.css"></link>
<script language="javascript" src="js/shCore.js"></script><br />
<script language="javascript" src="js/shBrushCSharp.js"></script><br />
<script language="javascript" src="js/shBrushXml.js"></script><br />
<script language="javascript">
dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf';
dp.SyntaxHighlighter.HighlightAll('code');
</script><br />
</textarea></p>
<p>You then put your code in-between &gt;pre&lt; tags and set a name attribute to &#8220;code&#8221; and set the class to whatever syntax you have- it has support for a whole bunch of languages including c#, vb, php, javascript, css, sql and a whole bunch of others.  You can grab this plug-in from <a href="http://code.google.com/p/syntaxhighlighter/" title="Google syntax highlighter">here</a></p>
<p>The install was easy- but a couple of bits did catch me out- the code sample above was the example they give you in the install page.  So I blindly copied over this code to the head of my blog, and copied all the files from the zip file over to my sites js and css folders.  I found that html highlighting worked fine and so did c# but vb and sql weren&#8217;t happening&#8230; It eventually clicked that you need to add the references to the additional syntax types you need as the example only has a line for the CS and XML/HTML &#8220;brush&#8221; libraries.  So I popped those lines in and it worked fine. </p>
<p>The other problem that I had, and indeed still have until I get home to actually edit the code, is compatibility with <a href="http://tinymce.moxiecode.com/">TinyMCE</a> which is the editor used by default in BlogEngine.  I found a couple of articles which might help with this but won&#8217;t know till tonight;</p>
<ul>
<li><a href="http://weblogs.asp.net/nawaf/archive/2008/04/06/syntaxhighlighter-plugin-for-tinymce-wysiwyg-editor.aspx">TinyMCE Code highlighter Plugin to work with Google Syntaxt Highlighter</a></li>
<li><a href="http://blog.daemon.com.au/go/blog-post/getting-tinymce-to-play-nice-with-dp-syntaxhighlighter">TinyMCE configuration settings to help everything get along a little better</a></li>
</ul>
<p>As mentioned on the Wiki pages there is also the issue that adding a name value to a pre tag, isn&#8217;t valid xhtml.</p>


<p>Related posts:<ul><li><a href='http://codeblog.shawson.co.uk/runaway-sharepoint-2003-indexing/' rel='bookmark' title='Runaway Sharepoint 2003 Indexing!'>Runaway Sharepoint 2003 Indexing!</a></li>
<li><a href='http://codeblog.shawson.co.uk/google-font-api/' rel='bookmark' title='Google Font API'>Google Font API</a></li>
<li><a href='http://codeblog.shawson.co.uk/asp-net-build-step-to-minify-and-obfuscate-your-sites-javascript-and-css/' rel='bookmark' title='Adding minification and obfuscation of your Javascript and CSS to your ASP.net build process using Yahoo YUI Compressor'>Adding minification and obfuscation of your Javascript and CSS to your ASP.net build process using Yahoo YUI Compressor</a></li>
</ul></p>]]></content:encoded>
			<wfw:commentRss>http://codeblog.shawson.co.uk/google-code-highlighter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

