[pmwiki-users] $FarmD problem

Patrick R. Michaud pmichaud at pobox.com
Tue Feb 13 19:40:45 CST 2007


On Tue, Feb 13, 2007 at 05:35:12PM +0800, john.mcginnis wrote:
> Seemingly I have a PmWiki Farm running. But I have another hmmm.
> 
> Running a child wiki from main I get '*Warning*: 
> include_once($FarmD/cookbook/XToDo.php) [function.include-once 
> <http://113.128.148.139/pmwiki/function.include-once>]: failed to open 
> stream: No such file or directory in 
> */var/www/pmwiki/local/farmconfig.php* on line ....'. [...]
> 
> In the /local/farmconfig.php I have:
> <?php if(.....
> $FarmPubDirUrl = 'http://....../pmwiki/pub';
> 
> include_once('$FarmD/Cookbook/XToDo.php');

Use double-quotes in the include_once() line, as in:

    include_once("$FarmD/Cookbook/XToDo.php");

With single quotes, PHP is looking literally for a directory
named '$FarmD' (i.e., dollar-sign + 'FarmD'), and it isn't finding one.

> Without the include_once() statement the farm works. Or seemingly so. 
> But I noticed something --
> 
> If I do a {$FarmD} in the sandbox the page variable renders nothing but 
> blank. I would has expected something like '/var/www/pmwiki/'

$FarmD is a PHP global variable, but it's not a page variable
(i.e., one that can be accessed via markup).  For a variety of
reasons (including security), PmWiki restricts the {$...} markup
to certain variables (defined by the $FmtPV array).

Pm



More information about the pmwiki-users mailing list