From: Dan F. <dfr...@cs...> - 2005-01-07 15:14:39
|
Manuel VACELET wrote: > Dan Frankowski wrote: > >> Reini Urban wrote: >> >>> Manuel VACELET schrieb: >>> >>>> Reini Urban wrote: >>>> >>>>> Manuel VACELET schrieb: >>>>> >>>>>> In order to be able to run multiple instances of PhpWiki based on >>>>>> the same sources and the same DB, I want to modify WikiDB and >>>>>> corresponding backends (at beginning PearDB) to add an unique id >>>>>> for each PhpWiki instances. >>>>> >>>>> >>>>> >>>>> >>>>> why? don't do that! >>>>> just define a different DATABASE_PREFIX for each wiki and generate >>>>> the tables with these prefixes. >>>> >>>> >>>> >>>> >>>> I want to offer phpwiki servicies to mutiple groups (I'm looking >>>> around gforge wiki plugin). For security reason I have to separate >>>> content of each instances of PhpWiki. I can have thousand instances >>>> of phpwiki so it imply ten thousand mysql tables. >>>> >>>> I already (successfully) tested database prefix but I think next >>>> phpwiki updates (with db schema upgrades) will be a little bit >>>> complicated. >>> >>> >>> >>> >>> So please use different databases for this task. Just a different DSN. >>> You can do that automatically by creating the DSN automatically >>> e.g. by prefixing the database with the gforge project name. >>> ("myproject_phpwiki") >>> Or even use the gforge database "myproject" and just add some >>> general "phpwiki_" prefix. >>> >>> Either prefixes or databases. >>> I see no technical reason for a WikiDB db_id. >> >> >> I can certainly imagine a reason to want multiple wiki instances in a >> single database. It's for ease of management. >> >> Suppose there is something that breaks upon upgrade for some DBs. If >> you have 10,000 DBs, then you have to nurse each one. Or suppose that >> you wish to change the parameters of the DB for size or performance. >> One can either apply that once, or have to somehow apply it 10,000 >> times. There are definite advantages to grouping wikis into a single DB. >> >> On the other hand, that doesn't mean it's easy to change Phpwiki to >> do that. > > > Even if Reini said to avoid this idea from my mind ... I did it :) > > On phpwiki 1.3.10 I made a hack to add a wiki identifier in the DB and > in the mysql back end. > > My hacked phpwiki runs since the beginning of december with around 10 > wiki on the same set of tables and there is -I hope- no conflicts. > > I could give you a patch if you are under interest. That's cool. You should submit a patch to Phpwiki, just in case Reini changes his mind. :-) Here is SourceForge's patches tracker: http://sourceforge.net/tracker/?atid=306121&group_id=6121&func=browse Dan |