<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Page comments</title>
		<link>http://www.ssbits.com/home/</link>
		<atom:link href="http://www.ssbits.com/home/" rel="self" type="application/rss+xml" />
		<description></description>

		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_1253</link>
			<description>Very simple and very elegant solution, i will start using this as soon as i get my local dev machine up and running again :o)
Thanks</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_1253</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_850</link>
			<description>This is a great approach! I was working to set up something similar, but my solution was more complicated. I love the elegant simplicity of this. Clever!</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_850</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_621</link>
			<description>Nice method, I like its simplicity! @John Learn you can also use Director::set_dev_servers() instead of preg_match()</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_621</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_601</link>
			<description>This works a treat. Thanks!</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_601</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_596</link>
			<description>I was also doing what Simon was doing, but I really like your solution, I've already implemented it and loving it.  Thanks.

I also added my Director::set_environment_type(&quot;dev&quot;) into each of those files so I can easily switch between dev, testing and live modes.</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_596</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_595</link>
			<description>I would be interested to know what you put in these different configurations that would benefit from being version controlled.  I only put stuff related to the deployment, such as DB connection and email servers.

These things don't tend to change unless you change host, in which case the previous versions are unlikely to be important.

If you really wanted you could keep a selection of deployment files such as _live-config.php, _test-config.php, _stage-config.php, which you can version control. In your _config.php you have a line like @include '_local-config.php'.  Then you can upload all the files to all the environments, remembering to do a rename fo the relevant file for each environment if it has changed.</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_595</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_594</link>
			<description>I like this a lot.  It's a lot cleaner than my solution.  Normally, I use a conditional based on the hostname to switch configurations, e.g:

if (preg_match('/www\\.logicbrush\\.com$/', $_SERVER['HTTP_HOST']) != 0) {
    // production configuration
} else if (preg_match('/staging\\.logicbrush\\.com$/', $_SERVER['HTTP_HOST']) != 0) {
    // staging configuration
} else {
    // development configuration
}

but that does expose the production db information to the developers (and it's a bit muddy).  Still, it does give me the flexibility to maintain multiple configuration types (prod, stage, dev).  I'm also not sure that keeping configuration files in subversion is actually a bad idea.  I mitigate that somewhat by managing my deployments with beanstalk so the devs never need to know the FTP details.
</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_594</guid>
		</item>
		
		<item>
			<title></title>
			<link>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_593</link>
			<description>Since it happens often, the dev (or more often, somebody else, we devs only do good things), overwrite's the _config with the database information, I've taken on the habit of adding the live-config in a comment.

On my live site, if I accidentally overwrite the database-settings somehow, I just uncomment it from the config, in stead of panicking where to find the db-info again.

Your solution is better though :)</description>
			<pubDate></pubDate>
			<dc:creator>RSSName</dc:creator>
			<guid>http://www.ssbits.com/snippets/2011/an-alternative-to-ss-environment-files-for-easy-per-environment-configuration/#PageComment_593</guid>
		</item>
		

	</channel>
</rss>