[pmwiki-users] Re: name of script in farm fields

Jeremy Sproat sproaticus at gmail.com
Wed Jul 6 23:48:17 CDT 2005


On 7/6/05, chr at home.se <chr at home.se> wrote:
> If you don't feel like modifying PmWiki.WikiFarm directly, you could
> simply copy the page to e.g. Test.WikiFarm, edit that page and ask for
> opinions before you copy the contents back to PmWiki.WikiFarm.

I was just trying to figure out how I am going to document this.  I
was playing with the idea of starting a new page in PmWiki or Cookbook
titled WikiFarmFieldNotes (I love the pun :-) but I don't know which
group it would be more approprite in.  Unfortunately, my brain turned
to mulch about 3 hours ago.

It's pretty late anyhow, so I'll just dump here what I have for now. 
Hopefully, I should be able to make it ready for pmwiki.org by the
weekend.

I put my farm into a non-web-accessable spot.  In the process I
installed a new field and converted an existing wiki into a field. 
The two fields are in the same domain, but in different schemes (http:
and https:) so for URL purposes they're basically in different
subdomains.

Because some of my new fields may reside on separate subdomains, I
opted to define $FarmPubDirUrl in the field's local/config.php file. 
But because at least two fields will have skins in common, I
soft-linked the wikifarm/pub directory into each of the fields, and
pointed the $FarmPubDirUrl to that.  (Need to evaluate: If I'm not
using a farm-wide pub directory, should I revert back to using a
per-field $PubDirUrl variable in local/config.php?)

The field's .htaccess file had to be changed twice.  Once to reflect
the field's field.php as the new DirectoryIndex.  I'm using CleanUrls
from Cookbook, and so change #2 was in the mod-rewrite rule.  Upon
reflection, I could have left the .htaccess alone by naming my field's
main script file pmwiki.php rather than the suggested field.php .

If you reuse the old wiki's local/config.php then keep this in mind: 
every "include" and "require" line in that file needs to be changed to
reflect the wikifarm's location.  e.g.
include_once('scripts/authuser.php') becomes
include_once($FarmD.'/scripts/authuser.php') and so on.  Note the
leading slash.

When converting the existing wiki into a field, I cleaned out the
field's root directory.  All that's left is field.php, .htaccess,
local, wiki.d, and a softlink to the wikifarm's pub directory.  I also
had to modify the file local/config.php to remove the $PubDirUrl
variable, and to redirect the include() and require() lines (see
above).

Each field has its own .htpasswd file.  I need to figure out how to
make the admin user the same across the farm, but allow per-field
users too.

That's it for now.  Every comment and criticism is welcome.

Cheers,
 - sproaticus




More information about the pmwiki-users mailing list