<?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>Tjitjing Blog</title>
	<atom:link href="http://blog.tjitjing.com/index.php/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.tjitjing.com</link>
	<description>This is my blog on technology related things and maybe some other stuff too...</description>
	<lastBuildDate>Wed, 24 Feb 2010 15:16:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wordpress on Windows/IIS cannot upgrade, add plugins, upload themes</title>
		<link>http://blog.tjitjing.com/index.php/2010/02/wordpress-on-windowsiis-cannot-upgrade-add-plugins-upload-themes.html</link>
		<comments>http://blog.tjitjing.com/index.php/2010/02/wordpress-on-windowsiis-cannot-upgrade-add-plugins-upload-themes.html#comments</comments>
		<pubDate>Wed, 24 Feb 2010 15:16:35 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Windows Server 2008]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[Windows Server]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=232</guid>
		<description><![CDATA[I have been struggling with this one ever since I moved my Wordpress installation from my old Windows 2003 server to a new Windows Server 2008 machine. If I try to use &#8220;automatic upgrade&#8221; to upgrade to the latest Wordpress release or upgrade or add a new plugin I get to the &#8220;Connection Information&#8221; page [...]]]></description>
			<content:encoded><![CDATA[<p>I have been struggling with this one ever since I moved my Wordpress installation from my old Windows 2003 server to a new Windows Server 2008 machine. If I try to use &#8220;automatic upgrade&#8221; to upgrade to the latest Wordpress release or upgrade or add a new plugin I get to the &#8220;Connection Information&#8221; page asking me to fill out ftp host name, user name and password. When I try to upload a new Wordpress theme I get 500 Internal Server Error. I have understood that this is a permissions problem in the file system but have failed to be able to solve it.<br />
I have been trying to give various users and groups permissions on the everything from the entire wordpress directory to the wp-content folder.<br />
<strong><br />
However what I did not realize until today is that (at least in my Windows installation) the group IIS_IUSRS does not have any group members but I should instead give the user IUSR permissions. Too easy&#8230; <img src='http://blog.tjitjing.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
So simply do this: give user IUSR Modify and Write permissions to your Wordpress directory.</strong></p>
<p>Finally!</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2010%2F02%2Fwordpress-on-windowsiis-cannot-upgrade-add-plugins-upload-themes.html&amp;linkname=Wordpress%20on%20Windows%2FIIS%20cannot%20upgrade%2C%20add%20plugins%2C%20upload%20themes"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2010/02/wordpress-on-windowsiis-cannot-upgrade-add-plugins-upload-themes.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP 5.3.1 upgrade on IIS7 and MySQL gives Internal Server Error</title>
		<link>http://blog.tjitjing.com/index.php/2010/02/php-5-3-1-upgrade-on-iis7-and-mysqlgives-internal-server-error.html</link>
		<comments>http://blog.tjitjing.com/index.php/2010/02/php-5-3-1-upgrade-on-iis7-and-mysqlgives-internal-server-error.html#comments</comments>
		<pubDate>Wed, 24 Feb 2010 14:36:20 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Windows Server]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=225</guid>
		<description><![CDATA[Solution
After a lot of googling and testing I finally found Bruce Kirkpatrick&#8217;s comment at the end of the PHP install manual
Seems it is no longer enough to have localhost in the servers local hosts file (C:\Windows\System32\drivers\etc\hosts) you also have to comment out or remove the IPv6 equivalent.
127.0.0.1       localhost
#::1  [...]]]></description>
			<content:encoded><![CDATA[<h2>Solution</h2>
<p>After a lot of googling and testing I finally found <a href="http://www.php.net/manual/en/install.windows.iis7.php">Bruce Kirkpatrick&#8217;s comment at the end of the PHP install manual</a></p>
<p><strong>Seems it is no longer enough to have localhost in the servers local hosts file (C:\Windows\System32\drivers\etc\hosts) you also have to comment out or remove the IPv6 equivalent.</strong></p>
<blockquote><p><code>127.0.0.1       localhost<br />
#::1             localhost</code></p></blockquote>
<p>After I did this everything worked ok again. Thanks Bruce!</p>
<h2>Problem</h2>
<p>I just upgraded PHP on my Windows Server 2008 running IIS7 from PHP 5.2.10 to 5.3.1. Used the non-threaded install package and installed for FastCGI.</p>
<p>After the upgrade installation worked fine for some non-database driven pages and phpinfo worked fine but whenever a page tries to accessed the MySQL database the browser only gave me a 500 Internal Server Error.</p>
<p>Checking the php error log (C:\Windows\Temp\php-errors.log) I get messages like this:</p>
<blockquote><p><code>[24-Feb-2010 13:44:36] PHP Warning:  mysql_connect() [&lt;a href='function.mysql-connect'&gt;function.mysql-connect&lt;/a&gt;]: [2002] A connection attempt failed because the connected party did not  (trying to connect via tcp://localhost:3306) in C:\inetpub\wwwroot\XXX\init_page.inc on line 32<br />
[24-Feb-2010 13:44:36] PHP Warning:  mysql_connect() [&lt;a href='function.mysql-connect'&gt;function.mysql-connect&lt;/a&gt;]: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.<br />
in C:\inetpub\wwwroot\XXX\init_page.inc on line 32<br />
[24-Feb-2010 13:44:36] PHP Fatal error:  Maximum execution time of 60 seconds exceeded in C:\inetpub\wwwroot\XXX\init_page.inc on line 32</code></p></blockquote>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2010%2F02%2Fphp-5-3-1-upgrade-on-iis7-and-mysqlgives-internal-server-error.html&amp;linkname=PHP%205.3.1%20upgrade%20on%20IIS7%20and%20MySQL%20gives%20Internal%20Server%20Error"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2010/02/php-5-3-1-upgrade-on-iis7-and-mysqlgives-internal-server-error.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide Empty Rich Text Field in Lotus Notes</title>
		<link>http://blog.tjitjing.com/index.php/2009/12/hide-empty-rich-text-field-in-lotus-notes.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/12/hide-empty-rich-text-field-in-lotus-notes.html#comments</comments>
		<pubDate>Fri, 11 Dec 2009 15:53:06 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Lotus Notes]]></category>
		<category><![CDATA[Lotusscript]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=215</guid>
		<description><![CDATA[The problem is very simple: I want to hide a Rich Text field (RTF) if it is empty and show it if it has something in it, in my case one or more attachments. In Lotus Notes a Rich Text Field will not evaluate to empty even if it is emtpy so using a common [...]]]></description>
			<content:encoded><![CDATA[<p><strong>The problem is very simple: I want to hide a Rich Text field (RTF) if it is empty and show it if it has something in it</strong>, in my case one or more attachments. In Lotus Notes a Rich Text Field will not evaluate to empty even if it is emtpy so using a common Hide-When forumula such as MyRTF=&#8221;" will not work and you can only use @Formulas.</p>
<p><strong>The solution:</strong></p>
<p>1) Create a new Numeric field, Computed for Display, Hidden, and with Value set to @ThisValue (or HideMyRTF if you are using an earlier release than ND6)  Lets call this field HideMyRTF in this example.</p>
<p>2) Set the Hide-When formula of your existing Rich Text Field &#8211; lets call it MyRTF in this example &#8211; simply to HideMyRTF (meaning if HideMyRTF is True then hide MyRTF)</p>
<p>3) Add some LotusScript using the <a href="http://www-12.lotus.com/ldd/doc/domino_notes/7.0/help7_designer.nsf/f4b82fbb75e942a6852566ac0037f284/0e1a24de5059f2f88525704a0040f2fb?OpenDocument" target="_blank">NotesRichTextItem</a> <a href="http://www-12.lotus.com/ldd/doc/domino_notes/7.0/help7_designer.nsf/2e73cbb2141acefa85256b8700688cea/474285929784b9738525704a0040f34d?OpenDocument" target="_blank">EmbeddedObjects property</a> to the Forms QueryOpen event. This will check if there are attachments or text in the field:</p>
<pre>Dim rtitem As NotesRichTextItem
Set rtitem = source.Document.GetFirstItem( "MyRTF" )
If Isempty(rtitem.EmbeddedObjects) And Trim(rtitem.Text) = "" Then
    source.Document.HideMyRTF = 1
Else
    source.Document.HideMyRTF = 0
End If</pre>
<p>That&#8217;s it.</p>
<p>It was a long time since I did any <a href="http://www.notes.net/" target="_blank">Lotus Notes development</a> so I&#8217;m a bit rusty. I&#8217;m sure I&#8217;ve come up with this or a similar solution in the past but I could not find any when searching so I had to start from the beginning.</p>
<p>This was for an existing app that has been around for quite a few years so there is no way for me to control anything from the beginning. I guess I could have used an agent to set some stuff but this would most likely cause tons of replication conflicts as there are tens of thousands of documents, still being updated by users and replicated across several servers.</p>
<p>Done with a Lotus Notes 7.02 client (I told you it&#8217;s been a while&#8230;) but should work on older and newer releases.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F12%2Fhide-empty-rich-text-field-in-lotus-notes.html&amp;linkname=Hide%20Empty%20Rich%20Text%20Field%20in%20Lotus%20Notes"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/12/hide-empty-rich-text-field-in-lotus-notes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Share Button in Frameset</title>
		<link>http://blog.tjitjing.com/index.php/2009/11/facebook-share-button-in-frameset.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/11/facebook-share-button-in-frameset.html#comments</comments>
		<pubDate>Wed, 25 Nov 2009 14:40:29 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=211</guid>
		<description><![CDATA[I spent a lot of time today figuring out how to get the Facebook Share Button to work in a frameset and display the frameset Url and Title instead of the Url and Title of the frame the button was placed in. I thought this should be very easy but it took me quite some [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a lot of time today figuring out how to get the <a href="http://www.facebook.com/facebook-widgets/share.php" target="_blank">Facebook Share Button</a> to work in a frameset and display the frameset Url and Title instead of the Url and Title of the frame the button was placed in. I thought this should be very easy but it took me quite some time to fnd an ok solution, probably because I&#8217;m not that good at Javascript. If you know of a better solution please let me know.</p>
<p>Facebook Share Button original code:</p>
<blockquote><p>&lt;a name=&#8221;fb_share&#8221; type=&#8221;icon_link&#8221; href=&#8221;http://www.facebook.com/sharer.php&#8221;&gt;Share&lt;/a&gt;<br />
&lt;script src=&#8221;http://static.ak.fbcdn.net/connect.php/js/FB.Share&#8221; type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;</p></blockquote>
<p>To set url and page title to that of frameset add this after above code:</p>
<blockquote><p>&lt;script&gt;<br />
document.getElementsByName(&#8216;fb_share&#8217;)[0].setAttribute(&#8216;href&#8217;, &#8216;http://www.facebook.com/sharer.php?u=&#8217; + escape(parent.location.href) + &#8216;&amp;t=&#8217; + escape(parent.document.title));<br />
&lt;/script&gt;</p></blockquote>
<p>One problem with directing Facebook direct to the frameset url is that it cannot find Content Summary and Image but I think this can be fixed by adding some <a href="http://wiki.developers.facebook.com/index.php/Facebook_Share/Specifying_Meta_Tags" target="_blank">meta tags as described in Facebooks documentation</a>.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F11%2Ffacebook-share-button-in-frameset.html&amp;linkname=Facebook%20Share%20Button%20in%20Frameset"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/11/facebook-share-button-in-frameset.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get a Google Wave invite</title>
		<link>http://blog.tjitjing.com/index.php/2009/11/get-a-google-wave-invite.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/11/get-a-google-wave-invite.html#comments</comments>
		<pubDate>Mon, 09 Nov 2009 12:20:52 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[google wave]]></category>
		<category><![CDATA[invites]]></category>
		<category><![CDATA[voddler]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=206</guid>
		<description><![CDATA[I have been trying out Google Wave for a few days now and I have to say that I&#8217;m not that impressed with the user experience &#8211; it is not at all inutitive, this is obviously the type of program where you really have to read the manual! But I will give it some more [...]]]></description>
			<content:encoded><![CDATA[<p>I have been trying out <a href="http://wave.google.com/help/wave/about.html" target="_blank">Google Wave</a> for a few days now and I have to say that I&#8217;m not that impressed with the user experience &#8211; it is not at all inutitive, this is obviously the type of program where you really have to read the manual! But I will give it some more time, read that manual, watch the instruction videos etc.</p>
<p>Anyway, I have some Google Wave invites so if you&#8217;re interested just comment here with your email and I will give away on a first come first serve basis.</p>
<p>Ps. I&#8217;m looking for a <a href="http://voddler.com/" target="_blank">Voddler</a> invite, anyone got one?</p>
<p><em>[Edit: I'm out of invites. Will post here again if I get new ones]</em></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F11%2Fget-a-google-wave-invite.html&amp;linkname=Get%20a%20Google%20Wave%20invite"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/11/get-a-google-wave-invite.html/feed</wfw:commentRss>
		<slash:comments>98</slash:comments>
		</item>
		<item>
		<title>Move or Copy Outlook 2007 settings to new PC</title>
		<link>http://blog.tjitjing.com/index.php/2009/10/move-or-copy-outlook-2007-settings-to-new-pc.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/10/move-or-copy-outlook-2007-settings-to-new-pc.html#comments</comments>
		<pubDate>Tue, 13 Oct 2009 10:46:37 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Office 2007]]></category>
		<category><![CDATA[Outlook]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=204</guid>
		<description><![CDATA[I just installed Windows 7 on a new PC, sent my Acer Laptop for repair and of course forgot to copy my macros in Outlook. This is not the first time I do this and I always forget something&#8230; so here is my todo list when moving Outlook 2007:
1) Move Outlook data files (pst files, [...]]]></description>
			<content:encoded><![CDATA[<p>I just installed Windows 7 on a new PC, sent my Acer Laptop for repair and of course forgot to copy my macros in Outlook. This is not the first time I do this and I always forget something&#8230; so here is my todo list when moving Outlook 2007:</p>
<p>1) Move Outlook data files (pst files, anything in the ost file I download again from Exchange server)</p>
<p>2) <a href="http://blog.tjitjing.com/index.php/2008/08/copy-outlook-signatures.html" target="_blank">Move Outlook 2007 signatures</a></p>
<p>3) Move Outlook 2007 accounts &#8211; there is for some reason no easy way of doing this since the 2007 version <img src='http://blog.tjitjing.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>4)  Move Outlook 2007 macros</p>
<p><a href="http://www.slipstick.com/config/backup2007.asp" target="_blank">Click here for a page that shows you the file locations for most Outlook 2007 files</a></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F10%2Fmove-or-copy-outlook-2007-settings-to-new-pc.html&amp;linkname=Move%20or%20Copy%20Outlook%202007%20settings%20to%20new%20PC"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/10/move-or-copy-outlook-2007-settings-to-new-pc.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP 5 with IIS 7 on Windows Server 2008 Tutorial</title>
		<link>http://blog.tjitjing.com/index.php/2009/06/php-5-with-iis-7-on-windows-server-2008-tutorial.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/06/php-5-with-iis-7-on-windows-server-2008-tutorial.html#comments</comments>
		<pubDate>Wed, 24 Jun 2009 16:38:44 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=178</guid>
		<description><![CDATA[A few years back I wrote a simple tutorial on how to install and configure PHP5 with IIS6 on Windows Server 2003 in five easy steps. Back then things were not as straight forward as they turned out to be when I tried it again today on a different server setup.
The following worked like a [...]]]></description>
			<content:encoded><![CDATA[<p>A few years back I wrote a <a title="PHP 5 IIS 6 tutorial" href="http://blog.tjitjing.com/index.php/2006/05/php5-with-iis6-on-windows-server-2003.html">simple tutorial on how to install and configure PHP5 with IIS6 on Windows Server 2003 in five easy steps</a>. Back then things were not as straight forward as they turned out to be when I tried it again today on a different server setup.<br />
The following worked like a charm on my Windows Server 2008 SP2 Standard Edition to install and configure PHP 5.2.10.</p>
<p>This tutorial presupposes that you have your Windows Server 2008 up and running with IIS (Internet Information Services) configured.</p>
<p>So this time I&#8217;m down to four easy steps for installing PHP:</p>
<ol>
<li>For reasons unknown to me ISAPI is no longer an option so make sure you have activated CGI support on your Windows Server, it is not done by default. Open up Server Manager, select Roles from navigation tree, and under Role Services click Add Role Services and make sure Web Server &#8211; Application Development &#8211; CGI is checked.</li>
<li> <a href="http://www.php.net/downloads.php" target="_blank">Download the latest version of PHP</a>. Download the PHP installer version found under Windows Binaries.</li>
<li> Run the downloaded MSI install pacakge to install PHP on your server. When asked what web server version to install select IIS FastCGI.</li>
<li>Done!</li>
</ol>
<p>To test your PHP installation simply create text a file with the php extension, eg. test.php. Add the following three lines of text to it and then save it to your web site directory, eg. C:\INETPUB\WWWROOT. Then use your browser to read the file, eg. http://localhost/test.php</p>
<p><code>&lt;?php<br />
phpinfo();<br />
?&gt; </code></p>
<p>Some other tips:</p>
<ul>
<li>If you want to use PHP with MySQL (or any other extensions) make sure you click this option when you install. Don&#8217;t worry if you miss it you can run install again at a later time to reconfigure.</li>
</ul>
<ul>
<li>Check out the <a href="http://www.php.net/manual/en/install.windows.php" target="_blank">official PHP.NET install guide for windows</a>.</li>
</ul>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 209px; width: 1px; height: 1px;"><img src="file:///C:/Users/Max/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></div>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F06%2Fphp-5-with-iis-7-on-windows-server-2008-tutorial.html&amp;linkname=PHP%205%20with%20IIS%207%20on%20Windows%20Server%202008%20Tutorial"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/06/php-5-with-iis-7-on-windows-server-2008-tutorial.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MySql.Data.MySqlClient.MySqlException: Parameter &#8216;@id&#8217; must be defined</title>
		<link>http://blog.tjitjing.com/index.php/2009/05/mysqldatamysqlclientmysqlexception-parameter-id-must-be-defined.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/05/mysqldatamysqlclientmysqlexception-parameter-id-must-be-defined.html#comments</comments>
		<pubDate>Sun, 10 May 2009 00:25:38 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=159</guid>
		<description><![CDATA[I found out a funny thing today. Or maybe not so funny when I think about it&#8230;
The order page on one of my sites have not been working since early November, almost 6 months!! As I&#8217;m sure you understand it&#8217;s not a very busy site, but usually I get a few orders per month so [...]]]></description>
			<content:encoded><![CDATA[<p>I found out a funny thing today. Or maybe not so funny when I think about it&#8230;</p>
<p>The order page on one of my sites have not been working since early November, almost 6 months!! As I&#8217;m sure you understand it&#8217;s not a very busy site, but usually I get a few orders per month so I should have noticed this a long time ago&#8230;</p>
<p>The site is running on IIS/ASP.NET and MySQL server 5.0.45 using the MySQL .NET Connector and I&#8217;m using a SQL statement like this on the page:</p>
<blockquote><p>START TRANSACTION;<br />
INSERT INTO table1 (companyname,street,city,zip) VALUES (&#8216;XS Tech&#8217;,'test&#8217;,'test&#8217;,'12345&#8242;);<br />
SELECT @id:=id FROM table1 where id = last_insert_id();<br />
INSERT INTO table2 (id,contactname) VALUES (@id,&#8217;Max&#8221;);<br />
COMMIT;</p></blockquote>
<p><strong>This statement was throwing an exception error: &#8220;MySql.Data.MySqlClient.MySqlException: Parameter &#8216;@id&#8217; must be defined&#8221;<br />
</strong><br />
Since I could not really remember &#8211; ie had not properly documented &#8211; what changes I may have done to that page six months ago, it made trouble shooting a bit harder. But to make a long story short(er) &#8211; It turns out I had upgraded the MySQL .NET Connector and this was causing the error. The site was using MySql.Data.dll version 5.2.1.0. I tried to upgrade to 6.0.3.0 to no avail. But when downgrading to 5.1.4.0 it started to work just fine again.</p>
<p><strong>Finally, I  found that this was indeed a change in the .Net Connector. (I&#8217;m not sure what version number but starting from 5.2.0 would be my guess)<br />
Starting from version 5.2.2 of the Connector you should add the <code class="literal">Allow User Variables=True </code><a href="http://dev.mysql.com/doc/refman/5.0/en/connector-net-examples-mysqlconnection.html#connector-net-examples-mysqlconnection-connectionstring" target="_blank">Connection String Setting</a> in order to use User Defined Variables in your SQL statements.</strong></p>
<p>Example of Connection String:</p>
<blockquote><p>Database=testdb;Data Source=localhost;User Id=root;Password=hello;Allow User Variables=True</p></blockquote>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F05%2Fmysqldatamysqlclientmysqlexception-parameter-id-must-be-defined.html&amp;linkname=MySql.Data.MySqlClient.MySqlException%3A%20Parameter%20%26%238216%3B%40id%26%238217%3B%20must%20be%20defined"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/05/mysqldatamysqlclientmysqlexception-parameter-id-must-be-defined.html/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Amazon S3 Command Line Copy for Windows</title>
		<link>http://blog.tjitjing.com/index.php/2009/04/amazon-s3-command-line-copy-for-windows.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/04/amazon-s3-command-line-copy-for-windows.html#comments</comments>
		<pubDate>Mon, 20 Apr 2009 18:21:08 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Amazon S3]]></category>
		<category><![CDATA[Backup]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=145</guid>
		<description><![CDATA[A couple of months ago I started to use Amazon S3 (Amazon Simple Storage Service) as off site backup for one of my servers. It&#8217;s dirt cheap and so far it works very well (I&#8217;m paying less than $1 per month for my daily uploads and storage!)
The server is running Windows Server 2008 and my [...]]]></description>
			<content:encoded><![CDATA[<p>A couple of months ago I started to use <a href="http://aws.amazon.com/s3/" target="_blank">Amazon S3 (Amazon Simple Storage Service)</a> as off site backup for one of my servers. It&#8217;s <a href="http://aws.amazon.com/s3/#pricing" target="_blank">dirt cheap</a> and so far it works very well (I&#8217;m paying less than $1 per month for my daily uploads and storage!)</p>
<p>The server is running Windows Server 2008 and my backup routine is simply a scheduled bat/cmd file to copy everything to a temp folder, then zipping it to a single file that I move off site (I used to ftp it to another host but you cannot use ftp with S3)</p>
<p>So, <strong>I needed to be able to upload my zip file to Amazon S3 using the command line</strong>. But unfortunately the only S3 copy or backup tools I found for Windows was either graphical and user driven or required Java, Perl or such and I didn&#8217;t really feel like installing any of that stuff on my server just for this simple task.</p>
<p><strong>The solution was to write my own copy routine</strong> in C# (.NET Framework 2.0) which I did using one of the <a href="http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=173" target="_blank">many S3 libraries available</a>, in my case I selected the <a href="http://threesharp.codeplex.com/" target="_blank">Affirma Threesharp C# Library</a>. The result is a very simple copy routine, you can only copy one file at a time, no wild cards etc. I will probably extend it in the future, for example a delete routine so I can also automate deleting old backups (I&#8217;m currently using the <a href="https://addons.mozilla.org/sv-SE/firefox/addon/3247" target="_blank">s3fox plugin for Firefox</a> to check on my backups and do deletes about once a month)<strong><br />
</strong></p>
<blockquote><p>Syntax: s3copy Localpath Bucket Filename AccessKeyId SecretAccessKey</p>
<p>Example: s3copy.exe c:\backup\ mybackupbucket backup.rar MyAccessKeyId MySecretAccessKey</p></blockquote>
<p><strong>It&#8217;s a single exe file. No need to install anything, the dll is contained in the exe.</strong> Feel free to use it if you like!</p>
<blockquote><p><span style="color: #0000ff;"><strong>Click button below download S3Copy.exe from Download.com</strong></span><br />
<a target="_blank" href="http://download.cnet.com/S3copy Amazon S3 Command Line Copy/3000-2242_4-10915715.html?part=dl-6267541&#038;subj=dl&#038;tag=button"><img src="http://i.i.com.com/cnwk.1d/i/dl/button/dl-button_a.gif" alt="Get it from CNET Download.com!" height="60" width="150" align="center" border="0"></a>
</p></blockquote>
<p><em>[ Edit/10 May 2009: </em><em>Thanks to Brad! </em><em>Corrected post + exe so that Access Key Id and Secret Access Key can be entered (you find your keys at <a href="http://aws.amazon.com/" target="_blank">Amazon's AWS: Your Account + Access Identifiers</a>) ]<br />
[Edit/15 June 2009: Moved file download to download.com]</em></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F04%2Famazon-s3-command-line-copy-for-windows.html&amp;linkname=Amazon%20S3%20Command%20Line%20Copy%20for%20Windows"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/04/amazon-s3-command-line-copy-for-windows.html/feed</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Google Adwords Conversion Optimizer Sucks</title>
		<link>http://blog.tjitjing.com/index.php/2009/04/google-adwords-conversion-optimizer-sucks.html</link>
		<comments>http://blog.tjitjing.com/index.php/2009/04/google-adwords-conversion-optimizer-sucks.html#comments</comments>
		<pubDate>Mon, 20 Apr 2009 08:07:25 +0000</pubDate>
		<dc:creator>Max</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[Google AdWords]]></category>

		<guid isPermaLink="false">http://blog.tjitjing.com/?p=140</guid>
		<description><![CDATA[I&#8217;m running a few Google Adwords campaigns but I must admit I&#8217;m not doing it properly. I&#8217;m too lazy to do proper follow-ups, check what new keywords are hot etc. So being lazy I&#8217;ve been running the Budget Optimizer for a long time. The Budget Optimizer lets you set a monthly budget and is then [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running a few Google Adwords campaigns but I must admit I&#8217;m not doing it properly. I&#8217;m too lazy to do proper follow-ups, check what new keywords are hot etc. So being lazy I&#8217;ve been running the <a title="Adwords Budget Optimizer" href="http://adwords.google.com/support/bin/answer.py?answer=16271" target="_blank">Budget Optimizer</a> for a long time. The Budget Optimizer lets you set a monthly budget and is then supposed to use its intelligence to bid on keywords to maximize the number of clicks you get each month.</p>
<p>Being even more lazy I switched to the <a title="Adwords Conversion Optimizer" href="http://adwords.google.com/support/bin/answer.py?hl=en&amp;answer=60150" target="_blank">Conversion Optimizer</a> without following up how it was performing. This was about a year ago. Early this month I finally did the follow up &#8211; simply comparing the number of clicks, cost and conversions to before. The result &#8211; about 30-50% less clicks and conversions than before. Cost &#8211; the same.</p>
<p>Confirming this I changed back to the Budget Optimizer on April 10. As you can see on the graph I had one day of &#8220;down time&#8221; and after that conversions and clicks raised at the same cost.</p>
<div id="attachment_141" class="wp-caption aligncenter" style="width: 382px"><a href="http://blog.tjitjing.com/wp-content/uploads/2009/04/google-adwords-conversion-optimizer.jpg"><img class="size-full wp-image-141" title="google-adwords-conversion-optimizer" src="http://blog.tjitjing.com/wp-content/uploads/2009/04/google-adwords-conversion-optimizer.jpg" alt="Google Adwords - Before and After turning off the Conversion Optimizer" width="372" height="227" /></a><p class="wp-caption-text">Google Adwords - Before and After turning off the Conversion Optimizer</p></div>
<p>In all fairness I also did another change, on April 7 I turned on show in Search Networks, which seems it had some effect also but mainly on that same day. Conspiracy theory: Did the Conversion Optimizer then quickly learn and brought down my conversions again the next day? <img src='http://blog.tjitjing.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>I&#8217;m sure there are a lot of settings and tweaking you can do to improve the numbers I have been getting. But again I have been too lazy to find out. But then again Google market these tools &#8211; Budget Optimizer and Conversion Optimizer &#8211; as tools for people like me, who are too lazy to follow-up and do their own keyword bidding.</p>
<p>Next on my todo list is to follow up on how good the Budget optimizer actually is compared to manual bidding&#8230;</p>
<p><img src="file:///C:/Users/Max/AppData/Local/Temp/moz-screenshot.jpg" alt="" /></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.tjitjing.com%2Findex.php%2F2009%2F04%2Fgoogle-adwords-conversion-optimizer-sucks.html&amp;linkname=Google%20Adwords%20Conversion%20Optimizer%20Sucks"><img src="http://blog.tjitjing.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://blog.tjitjing.com/index.php/2009/04/google-adwords-conversion-optimizer-sucks.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
