[Pmwiki-users] installing pmwiki2 - scripturl

Knut Alboldt mailing
Mon Sep 20 14:09:17 CDT 2004


At 21:37 20.09.2004, you wrote:
>On Sat, Sep 18, 2004 at 12:13:42AM +0200, Knut Alboldt wrote:
> > I started to install pmwiki 2.0.devel5 with:
> > [...]
> > without modifications (just unzipping and calling pmwiki.php), the vars 
> set
> > in pmwiki.php
> >
> >   $ScriptUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
> >   $PubDirUrl = preg_replace('#/[^/]*$#','/pub',$ScriptUrl,1);
> >
> > are set to a wrong value in my environment, cause $_SERVER['SCRIPT_name']
> > is the name of the php-executable (/phpbin/php.exe) and not the name of 
> the
> > php-script (/wiki2/pmwiki.php).
>
>Ah, the wonderful world of having so many different PHP configurations
>to choose from.  Maybe I should switch to $_SERVER['PHP_SELF'] instead?
>However, I've seen at least a few environments where PHP_SELF reports
>back the wrong value as well...
>
> > To fix this I'm setting
> >   $ScriptUrl = $_SERVER['PATH_INFO'];
> > in local/config.php.
> > But then I've to set
> >    $PubDirUrl = preg_replace('#/[^/]*$#','/pub',$ScriptUrl,1);
> > in local/config.php as well.
> >
> > Isn't there a better way to fix this ? e.g. setting $ScriptUrl before
> > calling pmwiki.php (but than pmwiki.php has to use SDV to set $ScriptUrl)
>
>The better way is to make PmWiki able to figure out the appropriate values.
>It'd be easier if PHP could at least have some consistencies across platforms.
>But, lacking that better way, the current way to do it is to set both
>$ScriptUrl and $PubDirUrl in local.php.

That's what I did at the end. But I switched pmwiki 1 to a wiki-farm, this 
functionality I implemented in another way before and a want to go back to 
standard if possible.
First I thought I've to set up an on config.php for each field but 
meanwhile I'got the right docs got it implemented well and it's running 
behaving like before.
So I setup these two vars in farmconfig.php. No problem.

Knut 




More information about the pmwiki-users mailing list