From: Reini U. <ru...@x-...> - 2004-06-16 13:58:01
|
Matthew Palmer schrieb: > Has anyone made any progress in this area? The major hold-up for me > updating Debian to 1.3.1[01] is that it'll force every PHPWiki user in > Debian to rewrite their config files, which is unlikely to make them jump > for joy. I hoped joby wants to do that, because my time is very limited with testing and bug hunting. It's not really hard to write though. > I did have one (potential) brain-wave, which would also, as a side-effect, > solve the major cause of complaint against the ini-file system. Put > together code which parses the INI file and writes a config.php full of > define()s and whatever else takes your fancy, and source *that* instead of > doing an INI parse every invocation. Then, just have a bit of code that > compares the mtime of config.ini with that of config.php, and rewrite > config.php if it's older than config.ini. The first user to hit the new > config file gets a 1-2 second slowdown, maybe, but that can be server lag, > and everyone else gets smokingly fast response times. good idea! > This also means that I can continue (more or less) to let Debian users work > on their config.php files directly if they have to, and switch to config.ini > when it suits them. This, of course, pre-supposes that the defines and such > for 1.3.10 are very close to those of 1.3.7, but I was careful to leave as > much of it intact as possible. > > Does this sound like a monumentally stupid, or clever, thing? clever. > I haven't been tracking the addition / renaming of config items, which is the big flaw > in my plan. Reini, has there been that much modification to the system such > that 1.3.7 config.php files would have no chance of working in 1.3.10? yes, I think there were a lot of such minor and dirty changes. It broke phpwiki.sf.net/demo for a week or so, because we forgot to check an important config variable. We have now config-default values, and the step after reading in the options moved from config.php to IniConfig.php:fix_configs(). The names didn't change at all (besides the new global $charset), but the logic changed. So the config.php dumper should check against config-default.ini before, do the fix_config() call and then dump it. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |