[pmwiki-users] Re: SourceForge.net Read-Only Policy - PmWiki-Compatible!

Patrick R. Michaud pmichaud at pobox.com
Sat May 14 09:04:07 CDT 2005

On Sat, May 14, 2005 at 03:41:12PM +0200, chr at home.se wrote:
> On Sat, 14 May 2005, H. Fox wrote:
> > If it's acceptable I'll put it, or something similar, in the cookbook
> > page.
> Please do! 

I agree.  I'm even thinking it might be worth a special script in the
cookbook (or perhaps the distribution) so that one can simply do:

    $SFProject = 'qdig';

and have it configure paths from there.

> > Next, create a directory to hold PmWiki data.
> > 
> > mkdir pmwiki-files
> > chgrp qdig pmwiki-files
> > chmod 2777 pmwiki-files
> Maybe 'pmwiki.d' would be a more consistent name for this directory? 
> (I'm thinking of wiki.d/, cache.d/ etc)

'pmwiki.d' sounds good (and consistent).

> > Next, visit the site to create a writable wiki.d directory...
> > ... which will be renamed to use as the directory for sessions data.
> > 
> > mv pmwiki-files/wiki.d pmwiki-files/sessions
> I think there is a pmwiki function we can simply call to create
> 'sessions/' directly...  Looking at pmwiki.php, I suspect it is 
> simply called 'mkdirp()'. According to it's brief comment:
> ## mkdirp creates a directory and its parents as needed, and sets
> ## permissions accordingly.
> Patrick, is ok to use this function to create directories that you want 
> pmwiki to be able to write to?

Sure, mkdirp() can be used to create any directory.  Just do
the following in the config file:


> > Visit the site again to create another wiki.d directory...
> > ...which will be renamed to use as the directory for uploads.
> > 
> > mv pmwiki-files/wiki.d pmwiki-files/uploads
> > 
> > Visit the site again to create another wiki.d directory.
> Ok... this is silly now... but I fully understand why you're doing it 
> (there are lots of times that I wish I'd created all these directories in 
> one go).

It doesn't hurt to have more mkdirp()'s in the config file:


If one is worried about the extra calls to mkdirp, it can also be done:

    if (! file_exists("$PmWikiD/sessions")) mkdirp("$PmWikiD/uploads");
    if (! file_exists("$PmWikiD/uploads")) mkdirp("$PmWikiD/uploads");


More information about the pmwiki-users mailing list