[dev] Generating conf.php

Martin Fraser mdf at darksnow.net
Mon Mar 26 17:00:33 UTC 2007


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