[horde] Runtime configuration switching

Jan Schneider jan at horde.org
Thu Sep 29 00:31:27 PDT 2005


Zitat von Chuck Hagenbuch <chuck at horde.org>:

> 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.

I thinks it's as easy as right now already. Put Horde outside the 
webroot, add and Alias directive for each vhost, and change or load 
configuration based on SERVER_NAME or HTTP_HOST.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list