[pmwiki-users] Page Store path definition

Petko Yotov 5ko at 5ko.fr
Fri Nov 27 03:04:54 CST 2009


On Friday 27 November 2009 08:59:01 Simon wrote:
> Problem solved,
> I have to make the path more relative, so to speak.
> vis   $FarmD/../../../onewiki/public_html/pmwiki/  etc
>
> thanks, and documentation updated
> 2009/11/27 Simon <nzskiwi at gmail.com>
> > Using $FarmD works fine for one wiki.

Inside a wikifarm, $FarmD always points to the same directory, so in both 
wikis you need to have the exact same lines repeated :
  $LockFile = "$FarmD/wikishared.d/.flock";
  $WikiDir = new PageStore('$FarmD/wikishared.d/$Group/$FullName');

How have you set your wikifarm? (Or read below.)

If you are not in a wikifarm, it is also best to use the same command lines, 
and it may be better to use full paths without $FarmD which doesn't point to 
the same directory. So, I'd use 
  '/home/onewiki/.../wikishared.d/.flock'        or, maybe, on Windows,
  'C:/home/onewiki/.../wikishared.d/.flock'      or even,
  'C:\\home\\onewiki\\...\\wikishared.d\\.flock'

Note that the recipe deals with shared pages among wikis in a wikifarm. If you 
are not in a wikifarm, you have a very custom installation, and it should be 
noted on the talk page, and that for wikifarms, people just need to use 
$FarmD/wikishared.d .

> > My directory structure is
> > /home/
> >     /onewiki/
> >         /public_html/
> >             /pmwiki/
> >                 /wiki.d/
> >                 /wikishared.d/
> >     /twowiki/
> >         /public_html/
> >             /pmwiki/
> >                 /wiki.d/

> > My challenge seems to be to let IIS access wikishared.d from twowiki,
> > hmmm I'll keep you posted, but if anyone has ideas  (file system in NTFS)

If you had a wikifarm, you'd have one set of the PmWiki installation, in your 
case, in 
  onewiki/public_html/pmwiki/

with all directories wikilib.d, cookbook, pub, pub/skins etc. and files
  index.php containing <?php include("pmwiki.php");
  local/farmconfig.php which applies to all wikis in the farm, and
  local/config.php which applies to onewiki.

In the directory 
  twowiki/public_html/pmwiki

you only have a file index.php which contains
  <?php include("/home/onewiki/...pmwiki.php"); # OR
  <?php include("../../../onewiki/...pmwiki.php"); 

You don't have here a pmwiki.php file, wikilib.d/, scripts/ or cookbook/ 
directories, etc. but you have local/ directory for configuration and pub/css 
and pub/skins directories for local styles and skins.

In a wikifarm shared between multiple domains, like yours seems to be, there 
is a catch with the shared stuff in the farm's pub/ directory (guiedit, 
recipes). In that case, you need to define the $FarmPubDirUrl variable in 
onewiki/.../local/farmconfig.php to something like:
  $FarmPubDirUrl = "http://www.onewiki.co.nz/pmwiki/pub";

I use a slightly different setting. In each wiki field, I have a symbolic link 
to the farm's shared pub direactory, named "common", that is
  twowiki/.../pmwiki/common is a link to 
  onewiki/.../pmwiki/pub

In that case, I just set
  $FarmPubDirUrl = "/common"; # you may want to use "/pmwiki/common"

I'm not sure if on NTFS filesystems you can have symbolic links.

Petko

> > 2009/11/26 Petko Yotov <5ko at 5ko.fr>
> > On Wednesday 25 November 2009 10:31:31 Simon wrote:
> >> > I am using the following code to share files in a group from
> >> > http://pmwiki.org/wiki/Cookbook/SharedPages-Talk
> >>
> >> Well, this section seems to have been written by you -- you might try to
> >> contact the author... :-)
...
> >> Always use $FarmD/wikilib.d and $FarmD/wikishared.d including for the
> >> .flock
> >> file and not /home/.../wikishared.d.
> >>
> >>  LockFile = "$FarmD/wikishared.d/.flock";
> >>  $WikiDir = new PageStore('$FarmD/wikishared.d/$Group/$FullName', 1);
> >>  # what you have next should work fine
> >>
> >> Petko




More information about the pmwiki-users mailing list