[Pmwiki-users] installing pmwiki2 - scripturl

Knut Alboldt mailing
Fri Sep 17 16:11:35 CDT 2004


I started to install pmwiki 2.0.devel5 with:
- win2000
- apache 1.3.27
- php 4.3.5 as CGI invoked by

   Action application/x-httpd-php  "/phpbin/php.exe"

   where /phpbin/ is defined with ScriptAlias to the local directory


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

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)

Knut




More information about the pmwiki-users mailing list