[Pmwiki-users] Site Statistics & PmWiki

Patrick R. Michaud pmichaud
Tue Sep 2 15:23:15 CDT 2003


On Tue, Sep 02, 2003 at 11:49:06AM -0700, geoff hopkins wrote:
> [...]  how can
> you know they are working if the STATS only show
> pmwiki.php as the hit URL???

Hmm.  This is one reason (among several) why I don't use
the ?pagename=foo.bar url syntax for my sites, such as pmichaud.com.  
By putting the pagename as part of the url's "path_info" component
instead of the query string, log analyzers can more easily
count hits to various PmWiki pages.

PmWiki looks at a variety of configuration issues to try
to decide if it should use the .../pmwiki.php/Group/PageName or
?pagename=Group.PageName form of urls, but sometimes PmWiki
guesses wrong and I haven't found a reliable mechanism for
determining when .../pmwiki.php/Group/PageName will work.
(?pagename=Group.PageName always works.)

However, you should be able to override PmWiki's guess by 
setting $EnablePathInfo=1 in local.php, which tells PmWiki 
to always use the .../Group/PageName (path_info) form of url.  If 
you're on a site where older versions of PmWiki were using 
path_info and newer ones are using ?pagename=Group.PageName,
then simply setting $EnablePathInfo=1 should revert back to
the old behavior.

Unfortunately, some web server and PHP configurations don't allow
additional information to appear after the program name--the symptom
is that they return a 404 "page not found" error in response to a
request for .../pmwiki.php/Group/PageName.  Such systems don't 
follow the CGI 1.1 specification (see the specification and examples at 
http://hoohoo.ncsa.uiuc.edu/cgi/ ), but we have to work with what
exists and not what a specification says.  If the web server software
or PHP won't support path_info, then PmWiki is pretty much forced
to use the ?pagename=Group.PageName syntax.  If this is the case,
then maybe the web log analyzer software can be configured to
honor the query string parameter part of the url.

In some environments the path_info part of a url doesn't work with
PHP scripts but does work with other cgi-bin scripts.  In these cases
we can often come up with a wrapper script that solves the problem.

I'll be very happy to provide whatever assistance I can to get
PmWiki's path_info form of urls working on any particular environment.
I just need to know the environment details and (sometimes) to be able 
to get the diagnostic output from a couple of test scripts and test 
queries.  Just let me know.

Pm

P.S.:  Another option might be to have PmWiki log and count its own hits
in a log file, rather than relying on the web logs.  This could be 
easily done via an add-on module if someone wanted to write one.


On Tue, Sep 02, 2003 at 11:49:06AM -0700, geoff hopkins wrote:
> 
> 
> Have some questions on PmWiki, and how it relates to
> site statistics.  I have a few sites that are still on
> an older version of Pmwiki.  Was thinking about
> changing them over.  When i noticed one day that the
> current sites i have that are on the updated versions
> do not have accurate hit statistics.  since pmwiki.php
> is the URL, and it uses ?pagename=foo.bar for the
> specific wiki page to show, The Statistic companies
> only show hits for PmWiki.php,and not the individual
> pages that were visited.  This is a hassle, when
> trying to use targeted marketing, and other techniques
> to increase pageviews of particular pages.  how can
> you know they are working if the STATS only show
> pmwiki.php as the hit URL???
> 
> 
> 
> 
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
> 
> _______________________________________________
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com



More information about the pmwiki-users mailing list