From: Jim C. <ji...@iN...> - 2004-06-28 21:14:56
|
Dan Frankowski wrote: > I replied that Twiki has a notion of multiple "webs", but Phpwiki had no > such. One could run multiple Phpwiki instances, but then if the code > changes, you have to update code and config for each instance separately. > > Does anyone have better ideas? Yes, Matthew Palmer was talking about enabling this for the Debian packaged version. The current stopper is that index.php looks in a fixed location for the config file, but if this were overridden by a php value set in the .htaccess file, you could have a lot of flexibility. Here's (part of) his original post ... >> Another method, if you wanted it, that would work in PHPWiki more or less >> as-is, would be to use the other method I devised for the above project >> (which I didn't use as the substring method was more appropriate in that >> case). Create a constant, perhaps called __CONFIGURED, that will be >> defined >> true once all of the appropriate config statements have been processed. >> Then, tell index.php not to call IniConfig() (or tell IniConfig() not to >> do >> anything) if __CONFIGURED is defined. >> >> How does this help? Because you put something like the following in your >> apache.conf for each of the virtualised PHPWiki instances: >> >> php_value auto_prepend_file /some/config/file.php >> >> Where /some/config/file.php is unique for each instance, and contains >> pretty >> much the following code: >> >> require_once '/usr/share/phpwiki/lib/IniConfig.php'; >> IniConfig('/some/config/file.ini'); >> define('__CONFIGURED', true); >> >> Again, where /some/config/file.ini is unique to that virtual instance of >> PHPWiki and filled with lovely local-specific config options. >> >> You then point each virtual instance of PHPWiki at /usr/share/phpwiki for >> it's code, index.php runs for everyone but skips the default config for >> your >> virtual instances because __CONFIGURED is defined, and IniConfig() has >> previously run with your per-instance config file. I'd like to see this too, because I'm currently running three wikis on the same machine, with the associated duplication of code files. Perhaps Matthew could implement this, and Reini could accept it into CVS? -jim |