[nycphp-talk] Local File versus DB-based configuration setting strategy
Mitch Pirtle
mitch.pirtle at gmail.com
Sat Jul 8 10:39:32 EDT 2006
On 7/8/06, Kenneth Downs <ken at secdat.com> wrote:
>
> Cliff Hirsch wrote:
>
> My config file (mainly constants and global arrays) has grown significantly
> as I have shifted more and more potentially dynamic info out of the code.
> However, this has opened another can of worms. I now realize that if I
> migrate beyond one server, it would be very difficult to keep the config
> information in synch using local files.
First, I'd start by splitting out the global settings (consistent
across servers) from local settings (local paths, accounts, etc). If
you develop your application with events/triggers, you could then use
xml-rpc to update all of your servers from the global settings, and
keep the local settings separate.
We've done a similar setup with Joomla 1.5, so you can use xml-rpc and
register an update plugin to fire off when that event happens. I try
to avoid putting too many config settings in the database, as that
really limits your options in the event of a database failure.
-- Mitch
More information about the talk
mailing list