On 19 January at 14:16, Chris Smith wrote: > Hi Andi, et. al., Hello, > Would you mind if I prepared a set of patches to make DokuWiki farmer > friendly? I have a running farm with dokuwiki. The media manager (file upload) part is the only broken one. The farm is using a common lib/ and inc/. conf/ and data/ are specific to each instance in the farm, and I only needed to copy the root doku.php file to each instance. Thus creating a new instance of a wiki inside the farm consists in: - creating a directory - copying doku.php to it - symlinking inc/ and lib/ - creating and populating conf/ and data/ I've set up a small demo on: http://isis-ulp.org/bug/farm Drawback: lib is common, so plugins and templates too. Advantage: except doku.php everything comes from a single (father) instance of dokuwiki, so upgrades are easy. The change to the code was very light (one line patch attached to this message). I have not investigated further on the media manager problem and haven't tested much so I don't know what else could be broken. > - assume farmer is competent systems administrator and not averse to > making some changes in files and able to create file links if required. Farming with separated directories allows to imagine a plugin which could create what's necessary to run a new instance of a wiki in a farm. > - new configuration file chain: I tried to avoid that, creating completely separated directories to host each instance of the farm. Keeping all config files together would be smarter. My first attempt was as yours, playing with the $conf['basedir'], $conf['baseurl'] and $conf['savedir'], but I failed. > I've not yet come up with an idea how to support both farm and local > contents of lib directory. What inside lib/ would be specific to a wiki instance? plugins and tpl... anything else ? Could $conf['template'] and $conf['plugins'] (this one is to be created) point to additional content specific to a wiki instance of the farm? -- bug
diff -ur dokuwiki/lib/exe/css.php www/farm/lib/exe/css.php --- dokuwiki/lib/exe/css.php Tue Dec 12 21:46:40 2006 +++ farm/lib/exe/css.php Sat Dec 16 18:18:01 2006 @@ -6,7 +6,8 @@ * @author Andreas Gohr <andi@xxxxxxxxxxxxxx> */ -if(!defined('DOKU_INC')) define('DOKU_INC',realpath(dirname(__FILE__).'/../../').'/'); +$tmp = explode('/',$_SERVER['SCRIPT_FILENAME']); array_pop($tmp); array_pop($tmp); +if(!defined('DOKU_INC')) define('DOKU_INC',dirname(join('/',$tmp)).'/'); if(!defined('NOSESSION')) define('NOSESSION',true); // we do not use a session or authentication here (better caching) require_once(DOKU_INC.'inc/init.php'); require_once(DOKU_INC.'inc/pageutils.php');