[pmwiki-users] Re: Can any one help me

Joachim Durchholz jo at durchholz.org
Mon Apr 4 02:16:53 CDT 2005


chr at home.se wrote:
> On Sat, 2 Apr 2005, Patrick R. Michaud wrote:
> 
>> BTW, this particular host's settings are very instructive for those
>> who often ask "Why doesn't PmWiki just use XYZ to set $ScriptUrl?"
>> On this host, for the url 
>> http://nkbbs.org/pmwiki/pmwiki.php/Main/HomePage?n=Main.HomePage&action=phpinfo
>> 
>> 
>>  PHP version     4.3.1
>>  SERVER_SOFTWARE Apache 1.3.31 (Unix)
>>
>>  SCRIPT_NAME    (not set)
>>  PHP_SELF       (no value)
>>  REQUEST_URI    /pmwiki/pmwiki.php/Main/HomePage?n=Main.HomePage&action=phpinfo
>>  SCRIPT_URL     /pmwiki/pmwiki.php/Main/HomePage
>>  SCRIPT_URI     http://nkbbs.org/pmwiki/pmwiki.php/Main/HomePage
>>  PATH_INFO      (not set)
>>
>> Compare this to pmwiki.org:
>>
>>  PHP version     4.3.2
>>  SERVER_SOFTWARE Apache/2.0.46 (Red Hat)
>>  
>>  SCRIPT_NAME     /wiki
>>  PHP_SELF        /wiki/Main/HomePage
>>  REQUEST_URI     /wiki/Main/HomePage?n=Main.HomePage&action=phpinfo
>>  SCRIPT_URL      (not set)
>>  SCRIPT_URI      (not set)
>>  PATH_INFO       /Main/HomePage
>>
>> As you can see, there doesn't appear to be a set of variables that
>> a script such as PmWiki can reliably use in every environment to correctly
> 
> Is the difference perhaps due to the Apache version?

I wouldn't expect this particular pattern of differences to come from 
the Apache version, though Apache probably switched policy between 
version during its evolution.
I wouldn't be surprised if some of these changes were between, say, 
1.3.20 to 1.3.21, and likewise from 2.0.15 to 2.0.16. (1.3 and 2.0 are 
being developed in parallel, so it's entirely possible to have the same 
variations in 1.3 and 2.0 versions.)

It really seems that the only reliable environment variable is 
REQUEST_URI. *sigh*
And even that may be unreliable on some rotten server.

IOW the selection of environment variables in use determines the set of 
servers that PmWiki can run on. In other words, it's probably best to 
live with the least set of environment variables that PmWiki can 
sensibly live off.

> Although it'd be very annoying having to check if it's Apache 1 or
> Apache 2 or whatever...

Plus IIS, Xitami, Zope, and whatnot...

Regards,
Jo



More information about the pmwiki-users mailing list