[pmwiki-users] [PATCH] Issue with pmwiki and PHP virtual() function (SSI)

Patrick R. Michaud pmichaud at pobox.com
Wed Nov 9 17:32:40 CST 2005


On Thu, Nov 10, 2005 at 12:23:58AM +0100, Mikael Nilsson wrote:
> To illustrate: in the header I use <!--function:includemeta -->, which
> is defined in config.php:
> 
> function includemeta($x) {
>   virtual("/kmr/meta.html");
> }

Faster/easier is to just use  <!--file:/path/to/kmr/meta.html--> and 
avoid the includemeta function (and the virtual call) altogether.
Then, since you aren't calling virtual(), you shouldn't run into
problems with the current directory changing, and you won't need
to worry about cleaning up directory paths or switching back.

If that doesn't solve it, let me know and we'll work through it.

> [...] So it seems more changes are needed. I tried 
> to put together a patch (attached), replacing the above definition and 
> some others with an absolute path, but that only works for my site and 
> path... and I might have missed any number of situations.
> ...

Please don't patch pmwiki.php (or the other distributed files)--
there's almost never any need to patch the distribution files as
the desired settings can nearly always be set in local/config.php  
or by a wrapper script.  (And if they can't, let me know and 
I'll fix it so they can.)

Pm




More information about the pmwiki-users mailing list