[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Local vs Live Config for sites without root control

From: Tom Lancaster <tom_at_2071.org>
Date: 2006-06-30 00:10:06 CEST

Ryan Schmidt wrote:

> I do this in my sites:
> <?php
> if (LIVE_SERVER) {
> define('DB_HOST', 'dbserver');
> define('DB_USER', 'foo');
> define('DB_PASS', 'bar');
> } else {
> define('DB_HOST', 'localhost');
> define('DB_USER', 'root');
> define('DB_PASS', '');
> }
> ?>
> And the LI, and IVE_SERVER constant is defined to true only on the development
> server.

Thank you. I do this also, I'm just wondering if there's a fancy way to
keep live and dev config files under version control as the same file.

Granted it's a minor problem, but it's happened more than once that I
uploaded my local config file to a staging server which had no idea
about some non-existent domain.

I think ignore-commit is not perfect, because I want certain changes to
config files to propagate. I also want other changes to propagate, and I
certainly want version control on said files.

Probably what I'm asking for is advanced regex hooks into svn exports (
when I'm ready to go live I should export, right??? )

Any advice on best practices here is very much appreciated.

Again, TIA,


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jun 30 00:12:19 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.