[Pmwiki-users] PmWiki on IIS

Patrick R. Michaud pmichaud
Sat Aug 30 02:41:10 CDT 2003


On Fri, Aug 29, 2003 at 12:24:22PM -0400, J. Perkins wrote:
> I warned you that I had some free time... ;)
> 
> I am trying to install PmWiki on an IIS server at work. For the most 
> part it works great. The one problem I am seeing is with the markup:
> 
>   [[$ThisPage:?action=edit Edit]]
>   [[$ThisPage:?action=print Print]]
> 
> Because IIS doesn't use the "AcceptPathInfo" type URLs, this generates 
> an href of "pmwiki.php?pagename=Main.Homepage?action=edit". Notice that 
> there are two '?' instead of one '?' and a '&'. This causes an error. 

You can change the '?' to '&' so that it reads:
   [[ThisPage:&action=edit Edit]]
   [[ThisPage:&action=print Print]]

(I'm assuming the '$' in your examples above were typos.)

> Is there a way to get IIS to use the PathInfo format (I googled but 
> couldn't find anything) or a way to work around this issue in PmWiki?

Short answer:  Try setting $EnablePathInfo=1 in local.php and 
   see IIS still works with that.

Medium answer: Does anyone have PmWiki installed on an IIS server where 
I could run a few test queries?  I don't have IIS or a convenient 
Windows server on which I can install it to be able to run my own tests.

Long answer:

The big problem that exists is that there's almost no way for PmWiki
to reliably detect if PathInfo will work on a given server.
This is especially true since the main symptom of "not working" is
that the user gets a 404 Page-Not-Found error, which means that PmWiki
never gets called to be able to trap/handle/recover from the error.  

As a result, PmWiki -tries- to make a good guess about whether or
not PathInfo queries will work, but this turns out to be quite unpredictable.
It seems to depend on quite a few factors:
   * The version of the web server being used
   * If Apache 2's AcceptPathInfo directive is on
   * The version of PHP being used (there are differences between 
     4.2 and 4.3)
   * If PHP is being run as an Apache handler, an Apache filter, or a
     CGI application
   * Any number of other configuration settings and variables

Worse, there doesn't seem to be reliable pattern to the results.
A few weeks ago I spent several hours running some tests in a wide variety
of PHP, Apache, and Boa configurations, to try to map out all of the
possibilities so that I can come up with a final solution for PmWiki's 
handling of PathInfo configurations.  But frankly some of the permutations
are really bizarre and difficult for me to explain/trap/handle, and
what's worse, a PHP script can't always detect all of the relevant
information (e.g., there doesn't appear to be any way for a PHP script 
to determine if Apache 2 has AcceptPathInfo enabled).

For the past couple of weeks I've had to focus on things other than 
PmWiki, so I had to shelve that work for a bit so I could take care of
my other responsibilities.  But I plan to revisit the problem very soon
(on the order of days or 1-2 weeks) and hope to come up with some more 
robust solutions.  The biggest help is when I'm able to run a few simple
diagnostics in environment/installations that seem to be somewhat
"non standard", so if anyone can help here I'd love to hear from you.  
(Many PmWiki users have already been extremely helpful in providing me 
access to such environments--thanks).

Pm



More information about the pmwiki-users mailing list