From: Matt B. <ma...@ma...> - 2005-10-21 11:03:03
|
Hi, As part of my work packaging PHPwiki for Debian I had to write a script to migrate old index.php based configurations to the new config.ini file. The script works reasonably well and handles most of the configuration variables. The major omission is that it doesn't attempt to migrate external authentication configuration at all (stuff like DB query strings etc). It's written in perl (sorry) and takes a single command line argument which is the path to a template file to use as the basis for the new config.ini. Your old configuration should be fed to stdin and you'll get the new configuration on stdout. The script can be found at http://www.mattb.net.nz/patches/phpwiki/migrate-phpwiki-config An example template configuration file is at http://www.mattb.net.nz/patches/phpwiki/config-template.ini There might be a little bit of Debian specific stuff there, but it should be fairly general. Run the script without arguments for more detailed usage information. Not sure if anyone is still using old wikis or if you've all upgraded by now, but maybe this will be of use to someone. Cheers -- Matt Brown ma...@ma... Mob +64 275 611 544 www.mattb.net.nz |
From: Reini U. <rei...@gm...> - 2005-10-22 19:26:07
|
Thanks, appreciated. I'll add it to CVS asap. On 10/21/05, Matt Brown <ma...@ma...> wrote: > As part of my work packaging PHPwiki for Debian I had to write a script > to migrate old index.php based configurations to the new config.ini > file. > > The script works reasonably well and handles most of the configuration > variables. The major omission is that it doesn't attempt to migrate > external authentication configuration at all (stuff like DB query > strings etc). > > It's written in perl (sorry) and takes a single command line argument > which is the path to a template file to use as the basis for the new > config.ini. Your old configuration should be fed to stdin and you'll get > the new configuration on stdout. > > The script can be found at > http://www.mattb.net.nz/patches/phpwiki/migrate-phpwiki-config > > An example template configuration file is at > http://www.mattb.net.nz/patches/phpwiki/config-template.ini > > There might be a little bit of Debian specific stuff there, but it > should be fairly general. > > Run the script without arguments for more detailed usage information. > > Not sure if anyone is still using old wikis or if you've all upgraded by > now, but maybe this will be of use to someone. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ |
From: Reini U. <rei...@gm...> - 2005-10-22 19:28:28
|
BTW: The config-template.ini is not needed, since the required info is already in config-dist.ini and config-default.ini But it's a good and easy to follow start. On 10/22/05, Reini Urban <rei...@gm...> wrote: > Thanks, appreciated. > I'll add it to CVS asap. > > On 10/21/05, Matt Brown <ma...@ma...> wrote: > > http://www.mattb.net.nz/patches/phpwiki/migrate-phpwiki-config > > http://www.mattb.net.nz/patches/phpwiki/config-template.ini |
From: Matt B. <ma...@ma...> - 2005-10-23 04:52:53
|
On Sat, 2005-10-22 at 21:28 +0200, Reini Urban wrote: > BTW: The config-template.ini is not needed, since the required info > is already in config-dist.ini and config-default.ini > But it's a good and easy to follow start. The problem with config-dist is that it contains multiple copies of some of the directives, the migration script isn't really smart enough to handle that nicely. config-template just contains a single entry for each directive. Maybe config-default would have been appropriate... I didn't actually consider that. Cheers -- Matt Brown ma...@ma... Mob +64 275 611 544 www.mattb.net.nz |
From: Reini U. <rei...@gm...> - 2005-10-23 18:52:08
|
On 10/23/05, Matt Brown <ma...@ma...> wrote: > On Sat, 2005-10-22 at 21:28 +0200, Reini Urban wrote: > > BTW: The config-template.ini is not needed, since the required info > > is already in config-dist.ini and config-default.ini > > But it's a good and easy to follow start. > > The problem with config-dist is that it contains multiple copies of some > of the directives, the migration script isn't really smart enough to > handle that nicely. > > config-template just contains a single entry for each directive. Maybe > config-default would have been appropriate... I didn't actually consider > that. True. I did most of the logic to combine these two already in configurator.php, and will change that in your perl script. Looks easy to me. -- Reini Urban |