<?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>Rory Hansen - Web and mobile app development, affiliate marketing, making money online, and entrepreneurship &#187; web development</title>
	<atom:link href="http://www.roryhansen.ca/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.roryhansen.ca</link>
	<description>Affiliate marketing, Internet marketing, web development, and small business ideas.</description>
	<lastBuildDate>Wed, 02 Nov 2011 00:49:42 +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>December Mid-Month Top Commentators Update</title>
		<link>http://www.roryhansen.ca/2008/12/15/december-mid-month-top-commentators-update/</link>
		<comments>http://www.roryhansen.ca/2008/12/15/december-mid-month-top-commentators-update/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 20:06:35 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/?p=126</guid>
		<description><![CDATA[We&#8217;re halfway into December, and getting closer to Christmas with each passing day. I thought I&#8217;d take a minute and highlight some of the great contributors to this website. So far, for the Month of December, the Top Commentators on my website are: chovy Michael Kwan GetRich HAL Heather in Beautiful BC Bernardine Felix MLDina [...]]]></description>
			<content:encoded><![CDATA[<p>We&#8217;re halfway into December, and getting closer to Christmas with each passing day. I thought I&#8217;d take a minute and highlight some of the great contributors to this website.</p>
<p>So far, for the Month of December, the Top Commentators on my website are:<br />
<span id="more-126"></span></p>
<ul>
<li><a href="http://chovy.com/" rel="nofollow">chovy</a></li>
<li><a href="http://btr.michaelkwan.com/" rel="nofollow">Michael Kwan</a></li>
<li>GetRich</li>
<li><a href="http://www.easyaffiliatecashflow.com/" rel="nofollow">HAL</a></li>
<li><a href="http://boatinginbeautifulbritishcolumbia.com/" rel="nofollow">Heather in Beautiful BC</a></li>
<li><a href="http://webpromocode.com/godaddy-coupons-and-promo-codes/" rel="nofollow">Bernardine Felix</a></li>
<li><a href="http://www.marketleverage.com/" rel="nofollow">MLDina</a></li>
<li>eddie34</li>
<li><a href="http://www.ozonesem.com/" rel="nofollow">John &#8211; Ottawa SEO</a></li>
</ul>
<p>Thanks everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/12/15/december-mid-month-top-commentators-update/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>$0.99 Domains from GoDaddy.com</title>
		<link>http://www.roryhansen.ca/2008/12/01/099-domains-from-godaddycom/</link>
		<comments>http://www.roryhansen.ca/2008/12/01/099-domains-from-godaddycom/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 23:36:35 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[blogging]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[make money online]]></category>
		<category><![CDATA[personal development]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/12/01/099-domains-from-godaddycom/</guid>
		<description><![CDATA[Happy Cyber Monday everyone! If you haven&#8217;t heard yet, you can use coupon code 99DOMAIN over at GoDaddy.com to purchase .com/.net/.org domain names for 99 cents! Update: The $0.99 domain name deal is dead, but you can find current GoDaddy.com coupon codes here. Before purchasing domain names, you should always find a working GoDaddy coupon [...]]]></description>
			<content:encoded><![CDATA[<p>Happy Cyber Monday everyone!</p>
<p><del datetime="2010-10-05T09:49:26+00:00">If you haven&#8217;t heard yet, you can use coupon code <strong>99DOMAIN</strong> over at GoDaddy.com to purchase .com/.net/.org domain names for 99 cents!</del></p>
<blockquote><p>Update: The $0.99 domain name deal is dead, but you can find current <a href="http://www.onlinecouponcodesfor.com/godaddy.com"><strong>GoDaddy.com coupon codes</strong> here</a>. Before purchasing domain names, you should always find a working GoDaddy coupon code first, as it&#8217;ll save you an easy 30% off your domain purchase.</p></blockquote>
<p>This is a smoking deal for anyone looking to start the New Year fresh with a new blog/website. Even if all you do is buy a domain for $0.99 and flip it for a few dollars on SitePoint or DigitalPoint, that few dollars is nearly pure profit!</p>
<p>To make the deal even more smoking, as always, if you purchase 5 or more domains from GoDaddy, they&#8217;ll throw in free Privacy Registration (a $11 savings on each domain!).</p>
<p>Keep in mind, this is just for 1-year domain name registrations. I&#8217;ve got a handful I&#8217;ll be registering tonight. Lemme know which domains you end up picking up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/12/01/099-domains-from-godaddycom/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How To: Cloak your Affiliate Links for Free in Under 3 Seconds</title>
		<link>http://www.roryhansen.ca/2008/11/23/how-to-cloak-your-affiliate-links-for-free-in-under-3-seconds/</link>
		<comments>http://www.roryhansen.ca/2008/11/23/how-to-cloak-your-affiliate-links-for-free-in-under-3-seconds/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 00:31:00 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[make money online]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/11/23/how-to-cloak-your-affiliate-links-for-free-in-under-3-seconds/</guid>
		<description><![CDATA[As Internet marketers, we all use affiliate links in some way or another. For some, they might be embedded into blog posts, while for others in landing pages or forum signatures. Regardless, affiliate links serve a necessary evil when making money online and we depend on them. Introduction to Affiliate Link Cloaking To improve the effectiveness of affiliate links, [...]]]></description>
			<content:encoded><![CDATA[<p>As Internet marketers, we all use affiliate links in some way or another. For some, they might be embedded into blog posts, while for others in landing pages or forum signatures. Regardless, affiliate links serve a necessary evil when making money online and we depend on them.</p>
<p><strong>Introduction to Affiliate Link Cloaking</strong><br />
<span id="more-110"></span><br />
To improve the effectiveness of affiliate links, Internet marketers often &#8220;cloak&#8221; their links. For example, on my blog, I&#8217;ve cloaked my affiliate link to Market Leverage.</p>
<p>Cloaking changes the URL from</p>
<p><a href="http://trendsbiz.com/a.php?a=CD11894&amp;b=25367&amp;d=470782&amp;l=0&amp;o=&amp;p=0&amp;c=4110&amp;s1=&amp;s2=&amp;s3=&amp;s4=&amp;s5=">http://trendsbiz.com/a.php?a=CD11894&amp;b=25367&amp;d=470782&amp;l=0&amp;o=&amp;p=0&amp;c=4110&amp;s1=&amp;s2=&amp;s3=&amp;s4=&amp;s5=</a></p>
<p>to</p>
<p><a href="http://www.roryhansen.ca/recommends/marketleverage.php">http://www.roryhansen.ca/recommends/marketleverage.php</a></p>
<p><strong>Benefits of Cloaking your Affiliate Links</strong></p>
<p>This has a number of benefits, including but not limited to:</p>
<ul>
<li>Prevention of affiliate link hijacking</li>
<li>Increased professionalism through attractive affiliate link presentation</li>
<li>Increased click-thru rate</li>
<li>Improved search engine optimization, because Google doesn&#8217;t like affiliate links</li>
</ul>
<p><strong>How to Cloak your Affiliate Links</strong></p>
<p>There are a number of high-quality products out there to help manage affiliate links, probably the most notable being the Ninja Affiliate Plug-in for WordPress.  These products can cost nearly $100 to purchase, and while that might be pennies in the jar for many Internet marketers, for those just starting out on the making money online scene, $100 can be a rather large investment. <em>For that reason, this blog post isn&#8217;t about those expensive products.</em></p>
<p><strong>The purpose of this blog post is to show you how you can cloak your affiliate URLs yourself, for free, and in just a few seconds.</strong></p>
<p>To do this, we&#8217;ll be using PHP, and in a nut shell, creating a PHP file on your web site that will redirect the user to your affiliate link.</p>
<p>Note: This is a very simplistic example, that does not contain any click logging and should probably not be used to manage more than 10 &#8211; 15 affiliate links. If you require a heavy-duty solution, you should consider the Ninja Affiliate Plug-in, or some similar product.</p>
<p>Note 2: To make an even more attractive affiliate link structure, it&#8217;s possible to use more advanced techniques, like creating a .htaccess file and specifying your URL format. But, that topic is out of scope for this post, too.</p>
<p>Anyway, let&#8217;s get started.</p>
<p><strong>Step 1: Determine how you want your links to look</strong></p>
<p>If you scroll up, you&#8217;ll notice that in the example, I decided that I wanted my affiliate links to take the form:</p>
<p>http://www.roryhansen.ca/recommends/productname.php</p>
<p>I&#8217;ve used the word &#8220;recommends&#8221; in the link to further &#8220;sell&#8221; the link. Many other famous IM&#8217;s use this same naming convention. Others have used similar naming conventions, such as:</p>
<p>http://www.roryhansen.ca/go/productname.php</p>
<p>http://www.roryhansen.ca/goto/productname.php</p>
<p>It&#8217;s really a personal choice, but you&#8217;ll need to decide that now before you proceed.</p>
<p><strong>Step 2: Create a new subdirectory on your website</strong></p>
<p>Using your favourite FTP program, connect to your website&#8217;s FTP server. In your base web site directory, you&#8217;ll need to create a new directory to store all of your cloaked affiliate link files.</p>
<p>In my example, the new directory I created was called &#8220;recommends&#8221;. This is what enables the cloaked affiliate link format I decided upon.</p>
<p><strong>Step 3: Create your cloaked affiliate link file</strong></p>
<p>In a text editor like Notepad, cut-and-paste the following code:</p>
<p>&lt;?php<br />
header(&#8216;Location: YOUR_AFFILIATE_LINK_URL_HERE&#8217;);<br />
?&gt;</p>
<p>Replace YOUR_AFFILIATE_LINK_URL_HERE with the actual affiliate link for your product.</p>
<p>Save the file using a friendly filename, to represent the product you&#8217;re advertising.Â In reference to my earlier example, I saved my file as marketleverage.php.</p>
<p><strong>Step 4: Upload your cloaked affiliate linkÂ file</strong></p>
<p>Again using your FTP program, upload your new cloaked affiliate link file into the new folder you just created.</p>
<p>And you&#8217;re done!</p>
<p><strong>So, how does this work?</strong></p>
<p>In your blog posts, you&#8217;re now going to link to the new cloaked affiliate link file you just created. For example, you might write:</p>
<p><em>Click here to sign-up for &lt;a href=&#8221;http://www.roryhansen.ca/recommends/marketleverage.php&#8221;&gt;Market Leverage&lt;/a&gt;.</em></p>
<p>The code in the file tells the browser to redirect the user to the URL you included into the file.</p>
<p><em>User clicks on link &#8211;&gt; Browser goes to marketleverage.php &#8211;&gt; Code tells browser to redirect user to the real affiliate link.</em></p>
<p>And there you have it, your first cloaked affiliate link.</p>
<p>Happy affiliate marketing!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/11/23/how-to-cloak-your-affiliate-links-for-free-in-under-3-seconds/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Tips from Google&#8217;s Search Engine Optimization Starter Guide</title>
		<link>http://www.roryhansen.ca/2008/11/15/tips-from-googles-search-engine-optimization-starter-guide/</link>
		<comments>http://www.roryhansen.ca/2008/11/15/tips-from-googles-search-engine-optimization-starter-guide/#comments</comments>
		<pubDate>Sat, 15 Nov 2008 22:52:05 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[seo]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/11/15/tips-from-googles-search-engine-optimization-starter-guide/</guid>
		<description><![CDATA[In Google&#8217;s recently released Search Engine Optimization Starter Guide (PDF ALERT!), they describe the best practices to follow to ensure that Google can properly crawl and index your site data. Shaun at Hobo has created a list of tips on what to AVOID doing, by summarizing many of the suggestions from the Starter Guide. Here are some [...]]]></description>
			<content:encoded><![CDATA[<p>In Google&#8217;s recently released Search Engine Optimization <a href="http://www.google.com/webmasters/docs/search-engine-optimization-starter-guide.pdf" rel="nofollow">Starter Guide</a> (PDF ALERT!), they describe the best practices to follow to ensure that Google can properly crawl and index your site data.</p>
<p>Shaun at Hobo has created a list of tips on what to AVOID doing, by summarizing many of the suggestions from the Starter Guide. Here are some interesting ones I saw:</p>
<p>Avoid:</p>
<ul>
<li>having deep nesting of subdirectories like /dir1/dir2/dir3/dir4/dir5/dir6/<br />
page.html</li>
<li>creating an <acronym title="HyperText Markup Language">HTML</acronym> sitemap that simply lists pages without organizing them</li>
<li>allowing your 404 pages to be indexed in search engines (make sure that your<br />
webserver is configured to give a 404 <acronym title="HyperText Transfer Protocol">HTTP</acronym> status code when non-existent<br />
pages are requested)</li>
<li>having a navigation based entirely on drop-down menus, images, or animations</li>
</ul>
<p>There are a total of 30 tips listed on Shaun&#8217;s post. Read them all <a href="http://www.hobo-web.co.uk/seo-blog/index.php/seo-to-avoid/" rel="nofollow">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/11/15/tips-from-googles-search-engine-optimization-starter-guide/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My October 2008 AdSense and Affiliate earnings</title>
		<link>http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/</link>
		<comments>http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/#comments</comments>
		<pubDate>Sun, 02 Nov 2008 21:13:09 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[amazon associates]]></category>
		<category><![CDATA[dealdotcom]]></category>
		<category><![CDATA[google adsense]]></category>
		<category><![CDATA[google adwords]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[mortgage goal]]></category>
		<category><![CDATA[ppc]]></category>
		<category><![CDATA[text-link-ads]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[yahoo search marketing]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/</guid>
		<description><![CDATA[Amazon Associates, AdSense, ClickBank, and Text-Link-Ads were responsible for my October earnings. Below is the breakdown: Earnings AdSense: $166.53 Clickbank: $437.58 Text-Link-Ads: $89.56 Sedo, Amazon Associates: ~$2 Paid Reviews: $22.54 Total earnings: $718.21 Costs No AdWords costs this month. Signed up for Findology, but have yet to start any campaigns. Total costs: $0.00 October Earnings: [...]]]></description>
			<content:encoded><![CDATA[<p>Amazon Associates, AdSense, ClickBank, and Text-Link-Ads were responsible for my October earnings. Below is the breakdown:</p>
<p><strong>Earnings</strong><br />
AdSense: $166.53<br />
Clickbank: $437.58<br />
Text-Link-Ads: $89.56<br />
Sedo, Amazon Associates: ~$2<br />
Paid Reviews: $22.54<br />
<strong>Total earnings:</strong> $718.21</p>
<p><strong>Costs</strong><br />
No AdWords costs this month.<br />
Signed up for <a href="https://www.findology.com/adv/signup.php?referrer=9800" rel="nofollow">Findology</a>, but have yet to start any campaigns.<br />
<strong>Total costs:</strong> $0.00</p>
<p><strong>October Earnings: $718.21</strong></p>
<p><a href="http://www.roryhansen.ca/2008/10/19/my-september-2008-adsense-results-a-starting-point-for-the-mortgage-challenge/">September Earnings: $335.79</a><br />
This represents a 214% improvement month-over-month.</p>
<p><strong><a href="http://www.roryhansen.ca/2008/10/14/my-affiliate-and-internet-marketing-goal-cover-my-monthly-mortgage-payment-by-june-2009/">Mortgage Goal</a></strong><br />
As you may recall, my goal is to earn enough each month through AdSense and affiliate marketing to cover the cost of my monthly mortgage payment. For the sake of the experiment, we&#8217;re saying it&#8217;s $1500/month.</p>
<p>This month I earned $718.21 profit, which is 48% of the way there. I have until June 2009 to hit my goal, so that leaves me with 8 more months to make up the remaining 52%.</p>
<p><strong>Concerns going forward</strong><br />
As I had mentioned in a previous post, my main contributing site has seen it&#8217;s traffic dive in recent days. By dive, I mean <a href="http://www.roryhansen.ca/2008/10/31/my-serps-where-did-they-go/">traffic has reduced by about 75%</a> (natural, search engine traffic). This concerns me because unless things pick up again, November earnings could potentially be 75% lower than October earnings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/11/02/my-october-2008-adsense-and-affiliate-earnings/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>My first CodeIgniter site launched! www.PremierLeagueShirts.com</title>
		<link>http://www.roryhansen.ca/2008/10/31/my-first-codeigniter-site-launched-wwwpremierleagueshirtscom/</link>
		<comments>http://www.roryhansen.ca/2008/10/31/my-first-codeigniter-site-launched-wwwpremierleagueshirtscom/#comments</comments>
		<pubDate>Sat, 01 Nov 2008 00:38:35 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[affiliate marketing]]></category>
		<category><![CDATA[code igniter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/10/31/my-first-codeigniter-site-launched-wwwpremierleagueshirtscom/</guid>
		<description><![CDATA[I first mentioned CodeIgniter back in February 2007 as something that really excited me, but it took over a year and a half for me to actually use it! Well, after a 2-day programming blitz, I launched my first CodeIgniter website yesterday. It&#8217;s hosted on the keyword domain www.PremierLeagueShirts.com and is an affiliate site targetting those [...]]]></description>
			<content:encoded><![CDATA[<p>I first mentioned <a href="http://www.codeigniter.com" rel="nofollow">CodeIgniter</a> back in February 2007 as <a href="http://www.roryhansen.ca/2007/02/09/3-things-im-excited-about-yahoo-pipes-code-igniter-and-facebook-api/">something that really excited me</a>, but it took over a year and a half for me to actually use it!</p>
<p>Well, after a 2-day programming blitz, I launched my first CodeIgniter website yesterday. It&#8217;s hosted on the keyword domain <a href="http://www.premierleagueshirts.com/">www.PremierLeagueShirts.com</a> and is an affiliate site targetting those looking for English Premier League jerseys. While still under heavy construction, the primary features are now available for use. The remaining changes will mostly be cosmetic and UI-related.</p>
<p>Here are some of the features that I programmed into <a href="http://www.premierleagueshirts.com/">www.PremierLeagueShirts.com</a>:</p>
<ul>
<li>SEO-Friendly URLS - Each and every URL is search engine friendly. Take for example some of these URLS:
<ul>
<li><a href="http://www.premierleagueshirts.com/store/subcategory/Shop_By_Player/Beckham_David">http://www.premierleagueshirts.com/store/subcategory/Shop_By_Player/Beckham_David</a></li>
<li><a href="http://www.premierleagueshirts.com/store/subcategory/Teamwear/Womens">http://www.premierleagueshirts.com/store/subcategory/Teamwear/Womens</a></li>
</ul>
</li>
<li>Product Search &#8211; While still quite simplistic, will return a list of products which matches the user&#8217;s query.</li>
<li>Completely Database-Driven: All content is stored in the Premier League Shirts database. No real-time webservice calls to the main affiliate site which may slow down page loads.</li>
</ul>
<p>And what&#8217;s left to come?</p>
<ul>
<li>Improved GUI &#8211; Yes, the UI is plain. But my goal was to get the site out there and crawled by the major search engines. Now that that&#8217;s done, I&#8217;ll see what can be done about the look-and-feel of the site.</li>
<li>Improved Search &#8211; The site search currently only looks at the Product Name, and not the Brand, Category, or Description. This will be looked into.</li>
<li>Stats &#8211; Record what products are being looked at, what&#8217;s being searched for, and store that all in the database. Spit that out onto new pages on the site for further crawling by Google.</li>
<li>Additional Content &#8211; What is on the site right now is strictly affiliate products and their descriptions. Obviously Google may not like that so much, so will have to look at additional sources of related content.</li>
</ul>
<p>So, what do you think so far? Since this is my first forray into the world of CodeIgniter, I&#8217;m please with what I&#8217;ve accomplished over the last 2 days.</p>
<blockquote></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/10/31/my-first-codeigniter-site-launched-wwwpremierleagueshirtscom/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CodeIgniter Blank Page Fix: Blank webpage when setting up CodeIgniter, PHP, MySQL, and Apache</title>
		<link>http://www.roryhansen.ca/2008/10/29/fix-blank-webpage-problems-when-first-setting-up-code-igniter-php-mysql-and-apache/</link>
		<comments>http://www.roryhansen.ca/2008/10/29/fix-blank-webpage-problems-when-first-setting-up-code-igniter-php-mysql-and-apache/#comments</comments>
		<pubDate>Thu, 30 Oct 2008 06:31:07 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[code igniter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/10/29/fix-blank-webpage-problems-when-first-setting-up-code-igniter-php-mysql-and-apache/</guid>
		<description><![CDATA[Today, I created my first website using the Code Igniter PHP framework and, oh boy, do I like it a lot more than Ruby on Rails. But I&#8217;ll dig into that further in a future post. The purpose of this post is to shed some light on a problem that I wracked my brain over [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I created my first website using the Code Igniter PHP framework and, oh boy, do I like it a lot more than Ruby on Rails. But I&#8217;ll dig into that further in a future post.</p>
<p>The purpose of this post is to shed some light on a problem that I wracked my brain over for a few hours last night.</p>
<p>The problem: <em>After installing Apache, PHP, and MySQL and configuring the Code Igniter framework, you get a blank web page when testing your first controller, model, and view.</em></p>
<p>What I discovered were two issues that, when combined, create the perfect storm of an installation problem:</p>
<ol>
<li>First, <u>MySQL is no longer enabled by default with PHP 5</u>. Says the PHP website of MySQL in PHP 5:<br />
<blockquote><p>MySQL is no longer enabled by default, so the php_mysql.dll DLL must be enabled inside of php.ini. Also, PHP needs access to the MySQL client library. A file named libmysql.dll is included in the Windows PHP distribution and in order for PHP to talk to MySQL this file needs to be available to the Windows systems PATH.</p></blockquote>
<p>It&#8217;s been a LONG time since I&#8217;ve programmed in PHP let alone installed PHP, so this was news to me. Anyway, if check out the <a href="http://ca3.php.net/manual/en/mysql.installation.php">MySQL installation notes</a> on the PHP website if you need help enabling MySQL.  </li>
<li>Unfortunately, that was the easy part. Once I had an error message to work with, Google lead me to the PHP website, and I was in the clear. But, for the longest time, I wasn&#8217;t even getting an error page. Remember, all I was getting was a blank HTML page. So what was the cause? Code Igniter&#8230;</li>
<li>Using some creatively placed <em>die()</em> calls, I found out that the application was dying when trying to connect to the database. (Previous to this, I had already double- and triple-checked my MySQL username and password in the Code Igniter configuration file, and had even tried out alternate accounts, like my MySQL root account.)What I found out was that <u>the MySQL drivers in Code Igniter were suppressing errors when attempting database connections</u>.</li>
</ol>
<p>This is what the code looks like in the Code Igniter mysql_driver.php file:<br />
<code><br />
function db_connect()<br />
{<br />
   if ($this-&gt;port != '')<br />
   {<br />
      $this-&gt;hostname .= ':'.$this-&gt;port;<br />
   }<br />
   return @mysql_connect($this-&gt;hostname, $this-&gt;username, $this-&gt;password, TRUE);<br />
}<br />
</code>The &#8220;@&#8221; symbol before the mysql_connect() function call supresses any errors that may be returned. It is that symbol that wasted a good 2 hours of my life.Anyway, after I removed the &#8220;@&#8221; symbol from the code and re-tested my web application, PHP spit out the error message that I should have been presented with hours ago, and I was well on my way to fixing the problem.<br />
 If you&#8217;re experiencing the same problem that I was, I hope this helps you correct it faster than I did! Best of luck.</p>
<p>Oh, and did I mention how much I prefer Code Igniter over Ruby on Rails? It&#8217;s messier, but with my C and Java background, it makes more sense than Ruby and Ruby on Rails does!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/10/29/fix-blank-webpage-problems-when-first-setting-up-code-igniter-php-mysql-and-apache/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Battle in Seattle movie hits close to home</title>
		<link>http://www.roryhansen.ca/2008/10/20/battle-in-seattle-movie-hits-close-to-home/</link>
		<comments>http://www.roryhansen.ca/2008/10/20/battle-in-seattle-movie-hits-close-to-home/#comments</comments>
		<pubDate>Mon, 20 Oct 2008 07:48:54 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2008/10/20/battle-in-seattle-movie-hits-close-to-home/</guid>
		<description><![CDATA[The Vancouver International Film Festival has come and gone, and although I had a small list of films I intended to watch, I never ended up making it out to the theatre. I suppose there&#8217;s always next year. On a related note, another film festival flick that I want to catch is Battle in Seattle, [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.viff.org/" rel="nofollow">Vancouver International Film Festival</a> has come and gone, and although I had a small list of films I intended to watch, I never ended up making it out to the theatre. I suppose there&#8217;s always next year. On a related note, another film festival flick that I want to catch is <a href="http://www.movietrailerlive.com/ct_0005_BattleinSeattle" rel="nofollow">Battle in Seattle</a>, which played at this year&#8217;s Toronto International Film Festival and opened in Vancouver, Montreal and Toronto this past week.</p>
<p>Having been in Vancouver at the time, I can vividly remember the news coverage of the street violence that erupted during the <a href="http://en.wikipedia.org/wiki/WTO_Ministerial_Conference_of_1999" rel="nofollow">WTO protests in 1999</a>. It&#8217;s these protests that the film Battle in Seattle centers upon, and by the looks of the trailer, the movie truly takes us back 9 years to those emotional days.</p>
<p><a href="http://www.movietrailerlive.com/ct_0005_BattleinSeattle"><img border="0" align="left" width="400" src="http://farm4.static.flickr.com/3121/2909265547_886e7c49ae.jpg?v=0" hspace="10" height="291" style="width: 400px; height: 291px" /></a></p>
<p>Back in 1999, the city of Seattle was host to the <a href="http://en.wikipedia.org/wiki/Wto" rel="nofollow">World Trade Organization</a>, which was big news then, as it was the first time the ministerial conference was being held in America. Although intended to highlight the launch of new trade talks with developing countries, the 40,000 plus protesters that collapsed into the heart of Seattle saw the conference as a rallying cry for protesting the globalization and exploitation that multinational corporations engage in. On news footage at the time, I can remember the stand-offs between the protesters and the Seattle Police Department, as well as the destruction to storefronts which resulted. Definitely a conflict Iâ€™d never want to be in the middle of.</p>
<p>The movie has a star-studded cast that includes the likes of Charlize Theron, Woody Harrelson, and Ray Liotta, which only helps to bolster my interest in the movie. (Who doesnâ€™t love Charlize!?) If youâ€™re interested in learning more about the movie, you can do so <a href="http://www.movietrailerlive.com/ct_0005_BattleinSeattle" rel="nofollow">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2008/10/20/battle-in-seattle-movie-hits-close-to-home/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Authenticating with LinkShare&#8217;s Link Locator Direct web service with C#</title>
		<link>http://www.roryhansen.ca/2007/09/06/authenticating-with-linkshares-link-locator-direct-web-service-with-c/</link>
		<comments>http://www.roryhansen.ca/2007/09/06/authenticating-with-linkshares-link-locator-direct-web-service-with-c/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 05:42:59 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[.net]]></category>
		<category><![CDATA[internet marketing]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2007/09/06/authenticating-with-linkshares-link-locator-direct-web-service-with-c/</guid>
		<description><![CDATA[I&#8217;ve spent the last couple hours debugging an authentication issue with LinkShare&#8216;s Link Locator Direct web service. My console appÂ wasÂ throwing the following exception: System.Web.Services.Protocols.SoapException: org.apache.axis.AxisFault:Pass in username/password The error message seems straight-forward enough&#8211; &#8220;Pass in username/password.&#8221; But what do you do if you know you are passing in the username and password? This was the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve spent the last couple hours debugging an authentication issue with <a target="_blank" href="http://www.linkshare.com/index.shtml" rel="nofollow">LinkShare</a>&#8216;s Link Locator Direct web service. My console appÂ wasÂ throwing the following exception:</p>
<blockquote><p>System.Web.Services.Protocols.SoapException: org.apache.axis.AxisFault:Pass in username/password</p></blockquote>
<p>The error message seems straight-forward enough&#8211; &#8220;Pass in username/password.&#8221; But what do you do if you know you <em>are</em> passing in the username and password?</p>
<p>This was the code I was using:</p>
<blockquote>
<pre>
LinkShareTextPromotion.EJBTextPromotionServiceService tp =
     new LinkShareTextPromotion.EJBTextPromotionServiceService();
tp.Credentials = new NetworkCredential(username, password);
tp.PreAuthenticate = true;
LinkShareTextPromotion.Text[] resultsÂ  = tp.GetAllLinks(sid);</pre>
</blockquote>
<p>Anyway, I finally lucked out and stumbled onto <a target="_blank" href="http://forum.abestweb.com/showthread.php?t=79986" rel="nofollow">this link</a> on the LinkShare forums, which lead me to <a target="_blank" href="http://radio.weblogs.com/" rel="nofollow">Gordon Weakliem&#8217;s blog</a> that had a <a target="_blank" href="http://radio.weblogs.com/0106046/2002/10/24.html" rel="nofollow">working solution</a>. Apparently this problem occurs due to how .NET authenticates.</p>
<p>If you&#8217;re experiencing the same error and got here via Google, then I hope this helps you get on your way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2007/09/06/authenticating-with-linkshares-link-locator-direct-web-service-with-c/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Been bitten by the programming bug again!</title>
		<link>http://www.roryhansen.ca/2007/08/30/been-bitten-by-the-programming-bug-again/</link>
		<comments>http://www.roryhansen.ca/2007/08/30/been-bitten-by-the-programming-bug-again/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 06:01:40 +0000</pubDate>
		<dc:creator>Rory</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.roryhansen.ca/2007/08/30/been-bitten-by-the-programming-bug-again/</guid>
		<description><![CDATA[It&#8217;s been a long, long time since I&#8217;ve done any web developmentÂ in my free time&#8211; at least, any non-work related web development. Well, after batting around a few business ideas with buddies these past couple weeks, I&#8217;ve enough motivation to actually go ahead and see what happens with one (or two or three) of them.Â  [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long, long time since I&#8217;ve done any web developmentÂ in my free time&#8211; at least, any non-work related web development. Well, after batting around a few business ideas with buddies these past couple weeks, I&#8217;ve enough motivation to actually go ahead and see what happens with one (or two or three) of them.Â  But first, I need to prepare my development environment.</p>
<p>My aging laptop has been by my side throughout university and the first few years of post-university employment, and, well, has seen me use a myraid of toolsÂ for the many different development phases of my life. Lots of these tools have since aged into obsoleteness, so the first phase of my development environment preparation saw me ridding my harddrive of many of these tools and/or turning off services that are no longer used. Gone is Eclipse, as well as Apache 1.3, PHP 4, and that old version of MySQL.Â Cya laterÂ RubyÂ and Python. IIS? Disabled.</p>
<p>I&#8217;ve decided to use <a target="_blank" href="http://www.codeigniter.com/" title="Code Igniter" rel="nofollow">Code Igniter</a> as my web application framework for these ideas I&#8217;m going to pursue. If you don&#8217;t already know, it&#8217;s a &#8220;powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications&#8221;, or so it&#8217;s website says at least. As such, after cleansing my laptop, I installed the newest versions of Apache, PHP, and MySQL. (Truth be told, I was surprised atÂ the relative ease at which they were installed. No configuration mess at all, although I&#8217;ll probably have to do a httpd.conf refresher in a few days.)</p>
<p>Has anyone ever used one of those pre-configured WAMP installation packages, such as WAMP5 at <a href="http://www.wampserver.com/en/" title="WAMP Server" rel="nofollow">WAMPServer.com</a>? What are your thoughts? Worth using? At first, I was tempted to use one of these packages, rather than installing each of the tools separately, but decided that I wanted the freedom to upgrade whenver, rather than when the WAMP5 distributable was updated.</p>
<p>Anyway, my laptop is nowÂ almostÂ all set to go! All that&#8217;s left is to set up some virtual directories, install Code Igniter, and then refamiliarize myself with PHP. Wish me luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.roryhansen.ca/2007/08/30/been-bitten-by-the-programming-bug-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

