[dev] Generating conf.php
Martin Fraser
mdf at darksnow.net
Tue Mar 27 13:40:51 UTC 2007
Nevermind!
I found that the generated PHP config file contains defaults from xml
file if the array containing the configuration has empty values.
Initially, and what caused the question below, was that I thought if the
config value was in the array, even if it was empty, would be put in
the output file.
Anyway, problem solved and I now have a way of automatically refreshing
out of date config files.
Cheers.
Martin...
Martin Fraser wrote:
> Hey.
>
> I'm working on a script to automatically update my horde installation
> from CVS.
> It essentially does what I do on the command line right now.
> CV update, run framework installation then regenerate any out of date
> configs.
>
> My problem is with the config stuff.
>
> I've had a good look at the code and I can get it generate a new config,
> but what it currently does is simply read in the existing file with
> getPHPConfig() then parsing the result with eval. I then use the
> resultant array to generate a new config with
> generatePHPConfig(new Variables(), $currentConf)
>
> The problem I'm having is with config settings that cannot be evaluated.
> I'm running this a shell script and in the main horde conf.php there are
> a couple of entries that access the $_SERVER[] array, which doesn't
> exist on the command line. So my question is how does the ConfigForm
> code output defaults from the xml file and how can I parse the existing
> conf.php file without evaluating those strings so I can regenerate the
> configuration from the new xml file as needed in my automated upgrade.
>
> I hope all that makes sense.
>
> Martin...
>
>
More information about the dev
mailing list