<?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>david.steadson.com &#187; PHP</title>
	<atom:link href="http://david.steadson.com/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://david.steadson.com</link>
	<description>a blog</description>
	<lastBuildDate>Fri, 01 Jan 2010 12:06:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Migrating to a new IIS7 install from IIS6</title>
		<link>http://david.steadson.com/2008/12/17/migrating-to-a-new-iis7-install-from-iis6/</link>
		<comments>http://david.steadson.com/2008/12/17/migrating-to-a-new-iis7-install-from-iis6/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 21:10:15 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[Asgard]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[DotNetPanel]]></category>
		<category><![CDATA[IIS6]]></category>
		<category><![CDATA[IIS7]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[URL Rewrite]]></category>

		<guid isPermaLink="false">http://david.steadson.com/?p=12</guid>
		<description><![CDATA[I recently sold the web hosting client base of my company Asgard Web Technologies and have been shutting down the US servers where the clients were hosted. Since I have a whole bunch of my own sites plus look after a few for some friends I spent a while hunting around for a new hosting [...]]]></description>
			<content:encoded><![CDATA[<p>I recently sold the web hosting client base of my company <a href="http://www.asgard.net" target="_blank">Asgard Web Technologies</a> and have been shutting down the US servers where the clients were hosted. Since I have a whole bunch of my own sites plus look after a few for some friends I spent a while hunting around for a new hosting solution closer to home. Eventually I settled on leasing a Windows 2008 VPS from <a href="http://www.tagadab.com/" target="_self">Tagadab</a>, a new UK based dedicated server and VPS provider. So far things are running great and I&#8217;m very pleased with the service.</p>
<p>As always though, migrating websites to new servers can be challenging. In this case I was moving from IIS6 to IIS7 plus upgrading to the latest versions of PHP and MySQL. In addition, Asgard was using the <a href="http://www.parallels.com/products/helm/">Helm control panel</a> for website management. The originally developers of Helm, WebHostAutomation, offered a free 5 client licence for Helm and this would have been ideal for maintaining my sites &#8211; but unfortunately Helm was bought out by Parallels and they&#8217;ve dropped this deal. While I could just maintain the sites through Windows, I liked the simplicity of a control panel and have decided to give <a href="http://www.dotnetpanel.com">DotNetPanel</a> a go. DotNetPanel has a free 5 client licence!</p>
<p>DotNetPanel proved relatively easy to setup, though there was of course a learning curve . With PHP I was eager to test the new FastCGI capabilities of IIS7 and <a href="http://learn.iis.net/page.aspx/246/using-fastcgi-to-host-php-applications-on-iis-70/">I found a great walkthrough on IIS.NET</a>.  The first site I migrated was <a href="http://www.fittogether.eu">fittogether.eu</a>, a new health based social network site based on <a href="http://www.joomla.org">Joomla</a> we&#8217;re developing. It worked perfectly. I then migrated <a href="http://www.mlmfacts.net">mlmfacts.net</a>, a wiki I&#8217;m setting up to try and track all the different companies in the <a href="http://www.mlmfacts.net">multi-level marketing</a> world, and that&#8217;s where problems began &#8211; it simply wouldn&#8217;t work, complaining about not being able to load various &#8220;includes&#8221;. I then tried setting up a wordpress blog (this one!) at <a href="david.steadson.com">david.steadson.com</a> and encountered almost the same issue.</p>
<p>After several hours of digging (and I&#8217;m not a PHP programmer) I eventually narrowed it down to a problem with the PHP function <em>realpath() </em>not providing the correct answer. I won&#8217;t go through the details here, you can read a bit about it on <a href="http://forums.iis.net/p/1153823/1887716.aspx">the iis.net forums where I reported the problem</a>, but eventually I discovered the issue was actually with how DotNetPanel sets up websites. A site like this wordpress blog is installed in c:/HostingSpaces/David1/david.steadson.com/wwwroot. Various folders for logs and backups etc are placed in c:/HostingSpaces/David1/david.steadson.com. This isn&#8217;t a particular unusual setup, on Helm for example the site would have been in c:/HelmSites/david.steadson.com/wwwroot.</p>
<p>So what was the problem? Well, by default Helm gives access to the account folder, /david.steadson.com, to the user account the web service runs under. On a default IIS7 install folk tend to setup their sites under c:/inetpub and this directory also has read permissions for the web service. DotNetPanel on the other hand did not give this permission and I eventually <a href="http://forum.dotnetpanel.com/forums/p/1695/24273.aspx#24273">found others who had reported similar problems</a>. Adding the permission allowed the sites to work fine!</p>
<p>The only other &#8220;challenging&#8221; migration task was setting up &#8220;friendly URLs&#8221;. At Asgard we used a commercially<a href="http://www.isapirewrite.com/"> IIS6 isapi module called isapi_rewrite</a> that allowed websites to do URL rewriting using .htaccess and much the same syntax as used on *nix with mod_rewrite. This year though, Microsoft released a free IIS7 module, <a href="http://learn.iis.net/page.aspx/460/using-url-rewrite-module/">URL Rewrite</a>, which does much the same thing, though with different syntax. Thankfully it comes complete with an &#8220;import&#8221; tool for importing mod_rewrite style rules and it&#8217;s working a charm.</p>
<p>So far I&#8217;ve migrated my various <a href="http://www.amwaywatch.com">Amway</a> hobby sites &#8211; <a href="http://www.amwaywatch.com">www.amwaywatch.com</a>, <a href="http://www.amwaytalk.com">www.amwaytalk.com</a>, <a href="http://www.thetruthaboutamway.com">www.thetruthaboutamway.com</a>, and <a href="http://www.amwaywiki.com">www.amwaywiki.com</a>, next step is some of my other business sites and a handful of friends websites! I&#8217;ve requested <a href="http://www.serverbeach.com/catalog/cust_ref_landing_new.php?REF=P48EC72XY8">Server Beach</a> shutdown the server they&#8217;re on in the middle of next week, so I&#8217;m on a deadline &#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://david.steadson.com/2008/12/17/migrating-to-a-new-iis7-install-from-iis6/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>
