Counter
When I moved the website from the old host, the old CGI Perl web counter stopped working. Because the new host supports php, I decided to try some php web counters. I found a simple one and had to do a couple of things to make it work. First I had to add a file to my www root called .htaccess that enabled php code on html files by adding this line of text:
Addhandler application/x-httpd-php .html .php
Next I had to set the CHMOD permissions for the file containing the page count to 777 or else it would read the file but be unable to increment the number and generated a bunch of error codes.
Unable to get all of that to work at first I tried CGI and Perl using this counter and this digital one. I found that the correct path to Perl was "#!/usr/bin/perl/" but that somehow any scripts stored in the www folder under cgi-bin were not available. I tried changing the CHMOD permissions, but nothing seemed to work. Even if I put an index.html file in cgi-bin, I couldn't see it from the web, so I think there is either a conflicting cgi-bin folder that I can't see or the webhost automatically disables cgi-bin folders. Some people on ASO's forums said that sometimes you had to get a support ticket to get the folder set up correctly.
Comments (2)
I think you should use Google.com/analytics. You can monitor multiple websites, each one getting a unique snippet of code you put at the bottom of your pages. Now that doesn't put a counter on our page, but it does let you do all kinds of counting.
I also use sitemeter with sjnlilburn.com, but have never put the count directly on the page.
Posted by jeb | September 22, 2007 10:02 AM
Since someone in the organization had asked for a counter, I had to have something on the page. ASO provides AWstats already for me to watch. So I just wanted a something simple and it was a chance to learn about CGI and PHP. Eventually I want to install a php bulletin board even though I doubt it would get much use.
Posted by UT | September 22, 2007 12:24 PM