httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neville Hillyer <n.hill...@open.ac.uk>
Subject [users@httpd] Re Unable to get PAGE_COUNT working
Date Fri, 20 Apr 2007 19:51:20 GMT
Neville's first message:
>I am a new Xserve (Apache 1.3) user and I have been unable to get
>PAGE_COUNT working despite the fact that SSI and other environmental
>variables are functioning for me. Does anybody know what additional
>settings are required for PAGE_COUNT? Do I need to initiate a count file
>or file location?

Neville's second message:
>This is still unresolved so I hope this additional information will enable
>somebody to tell me how to fix it. I have used a QPQ server for over 10
>years and am now moving all sites to Apache (1.3) on an Xserve. Everything
>appears to work OK except for PAGE_COUNT. All pages are parsed and most
>pages contain:
> <!--#echo var="LAST_MODIFIED"-->
> <!--#echo var="PAGE_COUNT"-->
>The date displays as expected but the hit counter only shows '(none)'.
>What have I done wrong or failed to do? Could moving the site root have
>caused a glitch? Where does Apache store the page counts?
>Any help would be much appreciated.

Joshua's reply:
>PAGE_COUNT is not an Apache or mod_include variable. It sounds like it was
>a custom thing generated by "QPQ".
>In general, I wouldn't recommend using a hit counter like that. It makes
>your site look very 1990, among other problems. But if you really want
>one, there are various ways to generate hit counters in apache using cgi
>scripts or modules:
>http://www.google.com/search?q=apache+hit+counter

Many thanks for this Joshua.

PAGE_COUNT used to be and, apparently, still is widely supported but, alas,
not by Apache although there are about 80 Google hits for PAGE_COUNT +
TOTAL_HITS + apache:
http://www.google.com/search?q=%22PAGE_COUNT%22+%22TOTAL_HITS%22+apache&num=100&
newwindow=1&filter=0
I was misled by Apple technical support who were of the opinion that I had
failed to set something up correctly.

After your reply I discovered that mounting the following file allows any
browser to see all the active environmental variables:
<html><head>
<title>Environmental Variables</title>
</head><body>
<pre><!--#printenv --></pre>
</body></html>

I agree with you that image counters can look dated which why I have never
used the QPQ image counter plug-in. Without the plug-in QPQ counted the
hits for every URL which were added to a single tab delimited two column
text file and could be displayed as text with <!--#echo var="PAGE_COUNT"-->.

I would like to find an efficient way to get Apache to use my existing
counter file but it appears that there are not many well developed SSI
based text hit counters which use a single file. The nearest I have found
so far is http://www.dan.co.jp/webcounter/ which can be used without its
image facility.

If anybody knows of, or wants to develop, a better or simpler single file
SSI based text hit counter I would be grateful if they could email me.
There can be advantages in having two extra columns for 'date of first hit'
and 'IP of last hit'. The last column can be used as a simple anti-clocking
device ie 'don't increment unless IP has changed'. I would prefer it to be
in perl however I have no experience of writing perl and am nervous of
potential difficulties with multiple Apache processes and shared memory.

Neville Hillyer
Chartered Electrical Engineer

ICT Webmaster
Open University

http://informatics.open.ac.uk/



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message