[pmwiki-users] Dealing with $ScriptUrl using a "local" path (Was: Wikipublisher..)
marc
gmane at auxbuss.com
Thu Dec 21 08:38:27 CST 2006
said...
> Hi John (and Patrick)
>
> I'm sending this to Patrick as well as the list I think the solution
> concerns PmWiki and possibly recipes in general.
>
> On Thu, 21 Dec 2006, christian.ridderstrom at gmail.com wrote:
>
> > I'm trying to install wiki publisher, but when trying to typeset a single
> > page I run into problems:
> >
> > Clicking download results in this link:
> >
> > http://www.wikipublisher.org/cgi-bin/mkpdf.pl//~chr/test/pmwiki.php?a<snip>
> |
> `-- stuff missing!
>
> I found the culprit. Wikipublisher uses $ScriptUrl for the URI to the
> pdfserver (at wikipublisher.org). Since I had set $ScriptUrl like this:
>
> $ScriptUrl = '/~chr/test/pmwiki.php';
>
> the pdfserver has no idea from where I am coming. the quick fix is this:
>
> $ScriptUrl = 'http://wiki.lyx.org/~chr/test/pmwiki.php';
I always use the full version. But I also use a hack to make things more
easily portable. In (farm)config.php, something like:
switch ($_SERVER['HTTP_HOST']) {
case 'localmachinename': $FQDN = 'localmachinename/~marc'; break;
case ...
default: $FQDN = $_SERVER['HTTP_HOST'];}
$FarmPubDirUrl = "http://$FQDN/pmwiki/pub";
# $ScriptUrl = 'http://$FQDN';
I tend to set $ScriptUrl in each field:
$ScriptUrl = "http://$FQDN/Fieldname";
This evolved more than it was designed, so this is only a suggestion,
not a recommendation.
--
Best,
Marc
More information about the pmwiki-users
mailing list