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

christian.ridderstrom at gmail.com christian.ridderstrom at gmail.com
Tue Mar 21 12:25:08 CST 2006


On Tue, 21 Mar 2006, H. Fox wrote:

> > 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.)

IIRC, that wasn't the problem (I tried with various kinds of paths). If 
you're interested, I can test it again.

> > > 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.

I've also been wondering this? Are we missing something here? Below is a
directory structure where I've placed only the stuff that must be web
accessible under the web tree. Can this structure be used?

      /srv
	|-- www/			Webroot
	|   |
	|   |-- pub/			Pub/-dir of the farm
	|   |
	|   |-- wiki1/
	|   |   |-- index.php
	|   |   |-- uploads/
	|   |   `-- pub/		Pub/-dir of wiki1
 	|   |
	|   `-- wiki2/
	|       |-- index.php
	|       |-- uploads/
	|       `-- pub/		Pub/-dir of wiki2
	|
	`-- farm
	    |-- pmwiki/
	    |   |-- pmwiki.php
	    |   |-- wikilib.d/
	    |   |-- cookbook/
	    |   |-- docs/
	    |   |-- scripts/
	    |   `-- local/
	    |       `-- farmconfig.php
	    |-- wiki1/
	    |   |-- local/
	    |   |   `-- config.php
	    |   `-- wiki.d/
	    `-- wiki2
	        |-- local/
	        |   `-- config.php
	        `-- wiki.d/

If this structure isn't feasible, why not? Would this be a good way to do 
it?

> >     $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?

Could we do

	$FarmPubDirUlr = array('/home/someuser/public_html/pub'
			       => 
			       'http://www.example.com/~someuser/pub')

> 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://...');

Perhaps something similar to what I wrote for $FarmPubDirUrl?

/Christian

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list