[development] Patching settings.php

Jeff Eaton jeff at viapositiva.net
Thu Aug 3 04:43:33 UTC 2006

> Jeremy Epstein wrote:
> > Hi guys, http://drupal.org/cvs?file=/sites/default/settings.php
> The root cause of this is the installer, which writes directly to 
> settings.php.
> I propose we move settings.php to settings-dist.php (or similar) and
> installer can copy that and update rather than write to a file that is

> in CVS.

Earl, after spending some time thinking things over this is a really
important step.

I just spent some time thinking through this, and looking at the install
code again. I believe we would have to:

1) Store the 'clean' copy in settings-dist.php
2) Check for the presence of settings.php, and *always assume* that file
is configured if it's present
3) If there's no settings.php, assume we're about to install
4) Once we've installed, COPY the settings-dist.php file to settings.php
(rather than renaming it or deleting it)

Does that make sense?


More information about the development mailing list