[horde] Runtime configuration switching

Chuck Hagenbuch chuck at horde.org
Wed Sep 28 17:12:43 PDT 2005


Quoting Lennon Day-Reynolds <lennon at reed.edu>:

> I've made some headway on a one-off, hackish solution to this problem for our
> environment here, but since I can't believe I'm the first to need 
> this kind of
> functionality, I wanted to poll the group to see what solutions other Horde
> admins and hackers have used to address this issue. It seems to me that the
> dev/test/publish cycle for most sites could be sped up significantly 
> with some sort of runtime configuration switching available across 
> the Horde codebase.

I'd like to eventually get to something like this:

index.php:
<?php

@define('HORDE_CONFIG_DSN', 'file:///var/horde/config/head-site1');
@define('HORDE_BASE', '/var/horde/head');

require_once HORDE_BASE . 'core.php';

Dispatcher::dispatch();
EOF

... and that's what's in the webroot. That glosses over graphics & css, 
but nothing else should need to be under a vhost. Then you could just 
edit those files to point them at different configs.

How'd that work for folks? (don't expect it _so_ soon though, we're 
along way from there). You could use any # of configs against the same 
codebase, either by customizing index.php to pick a config based on 
hostname, or different index.php files in different vhost webroots... 
The file would have just the two settings, a base include, and a "go" 
command, so customizing it should be easy.

-chuck

-- 
"But she goes not abroad in search of monsters to destroy." - John 
Quincy Adams


More information about the horde mailing list