[pmwiki-users] Why doesn't this installation sequence work?

H. Fox haganfox at users.sourceforge.net
Tue Mar 21 11:11:41 CST 2006


On 3/21/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Tue, Mar 21, 2006 at 01:08:57AM +0100, christian.ridderstrom at gmail.com wrote:
> >   cd
> >   svn checkout svn://pmwiki.org/pmwiki/tags/latest pmwiki
> >   mv pmwiki/pub public_html/farmpub
> >   echo "<?php \$FarmPubDirUrl='/~$USER/farmpub';" >pmwiki/local/farmconfig.php
>
> This ends up creating a file that looks like
>
>     <?php $FarmPubDirUrl='/~username/farmpub';
>
> and "/~username" isn't a valid file path specification.  (PHP doesn't
> understand or use the ~username syntax.)
>
> > So the problem is that skin.php looks in the wrong place for the skin.
> > AFAICT, the error occurs because pub/ isn't located in $FarmD, but I
> > didn't think $FarmD had to point there, just to where cookbook/ and
> > scripts/ is located?
> >
> > Do we need a new variable called something like $FarmPubD?
>
> Normally PmWiki expects to find the farm's pub/ directory in the
> same location as scripts and the like.

This seems incompatible with installing PmWiki in central location
outside the web space, which I thought was an existing feature.

> Instead of creating a $FarmPubD variable, I'd rather define a
> list of directories that PmWiki will search for skins:
>
>     $SkinPathFmt = array('pub/skins', '$FarmD/pub/skins');
>
> Or, perhaps more generally (so that we can get pub/css files
> as well):
>
>     $PubPathFmt = array('pub', '$FarmD/pub');
>
> Then someone needing the pub directory to be in a different place,
> or add more pub/ locations, can just modify $PubPathFmt.

I was thinking all that was needed would be a filesystem path that
matches $FarmPubDirUrl if pub/ is moved away from the PmWiki
directory.  My simple, low-impact patch (see PITS 00708) allows you to
have a farmconfig.php that looks something like this to make sure the
URL and the filesystem path match:

    <?php
    $FarmPubDirUrl="http://www.example.com/~someuser/pub
    $FarmPubD="/home/someuser/public_html/pub

What would these lines be if your solution were implemented?

Also , how can you specify different filesystem directories without
specifying the URLs to match?  I would think you would need

    $PubPathFmt[] = array('pub', 'http://...');
    $PubPathFmt[] = array('$FarmD/pub', 'http://...');

Hagan




More information about the pmwiki-users mailing list