[pmwiki-users] pmwiki broken under Apache 2.2/PHP 5.1.2

Patrick R. Michaud pmichaud at pobox.com
Sun Mar 26 09:05:52 CST 2006


On Sat, Mar 25, 2006 at 06:38:21PM -0500, Stirling Westrup wrote:
> H. Fox wrote:
> > On 3/24/06, Stirling Westrup <sti at pooq.com> wrote:
> >> Yesterday I upgraded to Apache 2.2 and PHP 5.1.2 and PmWiki broke. I'm
> >> running pmwiki-2.1.0.
> >>
> 
> > Try adding a test wiki according to the instructions here:
> > 
> > http://www.pmwiki.org/wiki/Cookbook/FarmSetupByExample#wiki_one
> > 
> > and see if you can surf its pages. Probably so.  If so, convert the
> > new test wiki to CleanUrls using the instructions here:
> > 
> > http://www.pmwiki.org/wiki/Cookbook/CleanUrls#samedir
> > 
> > If you get Clean URLs to work on that wiki, you will probably see
> > what's wrong with the other one.  If not, you may need to look at the
> > server configuration.
> 
> Well, I did as suggested and installed a new test wiki at 
> http://www.pooq.com/wiki. It has the config listed below, (with is as 
> suggested, with the addition of an $EnableDiag=1):
> [...]

At least on your system, Apache 2.2 seems to have changed its value 
for SCRIPT_NAME, which is what PmWiki has been using for deducing 
the path info data.  (A lot of configurations have traditionally 
provided incorrect PATH_INFO variables, which is why PmWiki went 
to an alternate detection mechanism based on the SCRIPT_NAME
and REQUEST_URI variables.)

So, because SCRIPT_NAME no longer works the way it did in
earlier versions of Apache, it's not getting the correct
pagename.

I think the quick fix is to put 

    $pagename = ResolvePageName($_SERVER['PATH_INFO']);

at the top of your config.php.  

Longer-term, I'll have to figure out how to get PmWiki to 
properly detect the pagenames in yet-another-Apache-configuration
possibility.  :-(  :-(

Pm





More information about the pmwiki-users mailing list