<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Switching server environments</title>
	<atom:link href="http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/</link>
	<description>Dave Marshall</description>
	<lastBuildDate>Sun, 24 Jan 2010 23:46:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: daveyboy</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-62794</link>
		<dc:creator>daveyboy</dc:creator>
		<pubDate>Thu, 21 Aug 2008 09:13:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-62794</guid>
		<description>No idea, I can&#039;t imagine there being much difference, except maybe my method requires an extra few bytes of memory for the environment variable.</description>
		<content:encoded><![CDATA[<p>No idea, I can&#8217;t imagine there being much difference, except maybe my method requires an extra few bytes of memory for the environment variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Rockefeller</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-62659</link>
		<dc:creator>John Rockefeller</dc:creator>
		<pubDate>Tue, 19 Aug 2008 23:29:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-62659</guid>
		<description>Just wondering if you have any data on which one is faster, yours or mine?</description>
		<content:encoded><![CDATA[<p>Just wondering if you have any data on which one is faster, yours or mine?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daveyboy</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-53109</link>
		<dc:creator>daveyboy</dc:creator>
		<pubDate>Thu, 29 May 2008 12:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-53109</guid>
		<description>@Chris:

Just followed your URL, good to see some more PHP guys flying the flag for Hull!</description>
		<content:encoded><![CDATA[<p>@Chris:</p>
<p>Just followed your URL, good to see some more PHP guys flying the flag for Hull!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daveyboy</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-53105</link>
		<dc:creator>daveyboy</dc:creator>
		<pubDate>Thu, 29 May 2008 12:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-53105</guid>
		<description>@Chris: 

We use a similar method at work, but only for application configuration, we don&#039;t really have environment modes. The other thing I like about doing it this way is the application reads it&#039;s config through regular constants, good for optimisation, no real need to cache settings etc., but developers and admins actually configure the application using an ini file.</description>
		<content:encoded><![CDATA[<p>@Chris: </p>
<p>We use a similar method at work, but only for application configuration, we don&#8217;t really have environment modes. The other thing I like about doing it this way is the application reads it&#8217;s config through regular constants, good for optimisation, no real need to cache settings etc., but developers and admins actually configure the application using an ini file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Ramsay</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-53087</link>
		<dc:creator>Chris Ramsay</dc:creator>
		<pubDate>Thu, 29 May 2008 10:22:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-53087</guid>
		<description>That&#039;s an interesting way of dealing with multiple environments, not one I would have thought of!

I notice that you use phing as a build engine - I use phing to rewrite a constant env variable in a config file. This is useful if deploying the same code to several machines at once.</description>
		<content:encoded><![CDATA[<p>That&#8217;s an interesting way of dealing with multiple environments, not one I would have thought of!</p>
<p>I notice that you use phing as a build engine &#8211; I use phing to rewrite a constant env variable in a config file. This is useful if deploying the same code to several machines at once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gelo</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-52873</link>
		<dc:creator>Gelo</dc:creator>
		<pubDate>Tue, 27 May 2008 08:38:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-52873</guid>
		<description>Very informative :) Thanks for having blog like this. keep up the good work :)</description>
		<content:encoded><![CDATA[<p>Very informative :) Thanks for having blog like this. keep up the good work :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tim</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-52867</link>
		<dc:creator>Tim</dc:creator>
		<pubDate>Tue, 27 May 2008 07:54:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-52867</guid>
		<description>For those who don&#039;t have access to the httpd.conf, most hosts allow the SetEnv in the .htaccess. If yours doesn&#039;t, it&#039;s probably time to switch !</description>
		<content:encoded><![CDATA[<p>For those who don&#8217;t have access to the httpd.conf, most hosts allow the SetEnv in the .htaccess. If yours doesn&#8217;t, it&#8217;s probably time to switch !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daveyboy</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-52811</link>
		<dc:creator>daveyboy</dc:creator>
		<pubDate>Mon, 26 May 2008 18:28:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-52811</guid>
		<description>As long as you code defensively enough, the method you outlined should be secure.  

In your little example, you use an If ... Else If construct. If you were to continue that block and have an Else block at the bottom, this could be a catch all, effectively your default site. 

I think the real danger with these variables is when people start doing this type of thing.

&lt;a href=&quot;&lt;?php echo $_SERVER[&#039;SERVER_NAME&#039;];? rel=&quot;nofollow&quot;&gt;/dave.php&quot;&gt;Dave&lt;/a&gt;

They think they don&#039;t need to escape $_SERVER[&#039;SERVER_NAME&#039;] because they think it&#039;s safe.</description>
		<content:encoded><![CDATA[<p>As long as you code defensively enough, the method you outlined should be secure.  </p>
<p>In your little example, you use an If &#8230; Else If construct. If you were to continue that block and have an Else block at the bottom, this could be a catch all, effectively your default site. </p>
<p>I think the real danger with these variables is when people start doing this type of thing.</p>
<p>&lt;a href=&#8221;&lt;?php echo $_SERVER['SERVER_NAME'];? rel=&#8221;nofollow&#8221;&gt;/dave.php&#8221;&gt;Dave&lt;/a&gt;</p>
<p>They think they don&#8217;t need to escape $_SERVER['SERVER_NAME'] because they think it&#8217;s safe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Rockefeller</title>
		<link>http://www.davedevelopment.co.uk/2008/05/26/switching-server-environments/comment-page-1/#comment-52801</link>
		<dc:creator>John Rockefeller</dc:creator>
		<pubDate>Mon, 26 May 2008 16:03:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.davedevelopment.co.uk/?p=64#comment-52801</guid>
		<description>Hi Dave
Thanks for taking the time to provide an alternate method to switching code based on domains. I am curious, is there any way to safely do this for those of us without access to mod_env or the apache config? Say for shared hosting or something of that sort?</description>
		<content:encoded><![CDATA[<p>Hi Dave<br />
Thanks for taking the time to provide an alternate method to switching code based on domains. I am curious, is there any way to safely do this for those of us without access to mod_env or the apache config? Say for shared hosting or something of that sort?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
