[Pmwiki-users] Install with PHP as CGI: wrong $PageUrl

Nathan Jones nathanj
Sun Sep 7 22:50:41 CDT 2003


I'm trying to install pmWiki on a system which runs PHP as a CGI, rather
than as an Apache module. pmWiki realises this and turns off
$EnablePathInfo, which is fine.

The problem I encounter on this particular system is that links appear in
the format:

http://example.com/cgi-bin/php4.cgi?pagename=Main.HomePage

According to pmwiki.php:

$PageUrlFmt = '$ScriptUrl/$Group/$Title_';
$ScriptUrl = 'http://'.$HTTP_SERVER_VARS['HTTP_HOST'];
$ScriptUrl .= $HTTP_SERVER_VARS['SCRIPT_NAME'];

...so obviously the local webserver is setting the php4.cgi path as the
value of  $HTTP_SERVER_VARS['SCRIPT_NAME'] instead of using the path of
the PHP file being parsed (pmwiki.php).

Any suggestions as to how I might get around this?

You can't see the installation itself, as it's behind a firewall, but I
can provide more information about the local environment if it will help.

-- 
Nathan Jones



More information about the pmwiki-users mailing list