[pmwiki-users] Newbie: problems with CookBook/CleanUrls and $EnablePathInfo

Mike Capp mike.capp at gmail.com
Sat Apr 29 16:44:01 CDT 2006


I've just started playing with PmWiki this afternoon - first
impressions very positive, but I hit a couple of snags when trying
CookBook/CleanUrls and am finding myself stumped by one of them.

Background: I'm a full-time programmer, pretty familiar with general
webdev and using wikis (mostly MediaWiki), but this is my first
exposure to PHP or the whole server-admin side of things so chances
are good that I'm doing something stupid.

I was following sub-recipe 1.3, "mod_rewrite with .htaccess in the
Site's Document Root", including the "Serving Existing Content"
conditionals. I'm running Uniform Server 3.3 (Apache 2.0.55, PHP
5.1.1) on WinXP.

First problem: initially, as soon as I added "RewriteEngine On" to the
.htaccess, I started getting permission errors for everything. After
an embarrassing amount of floundering I tracked this down to Apache
needing the line

Options SymLinksIfOwnerMatch

before any rewrite lines. Obvious once you look at the error logs
("Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies
that RewriteRule directive is forbidden"), but not from the server
response, so it might be worth mentioning this in the cookbook.

Second problem: without $EnablePathInfo in my config.php everything is
still working, but I still have the nasty /?n=Foo.Bar on URLs. *With*
$EnablePathInfo, URLs are nice and clean, but links only work with in
the Main group. When trying to follow one of the other SideBar links,
such as Basic Editing, I just get 404s, and from the errorlog Apache
seems to be looking for the page name, sans group, directly under
the... ah! Wait a minute...

(Exit pursued by inspiration. Alarums and excursions. Sounds of rapid
.htaccess editing offstage.)

Got it. I wouldn't like to guess at exactly what's going on, but the
root problem seems to be that I installed into a "pmwiki" directory as
per the recommendation, and on Windows with its case-insensitive
filesystem some part of the mod_rewrite voodoo is getting confused
between "pmwiki" (directory) and "PmWiki" (group name that looks like
a directory when $EnablePathInfo is on).

As a workaround, changing my install folder to "wiki" solves the
problem, although this still leaves the ugly fact that
Windows+CleanUrls places the install dir name off-limits as a group
name, so a cleaner solution would be nice.

cheers
Mike




More information about the pmwiki-users mailing list