Counter 4.0

Installation Instructions


Setting up the counter

First you must download the counter script itself, you can look at the availability section for more information about that.

After you downloaded the counter, you must either move or copy the counter into your cgi-bin directory. If you do not know where that is, you should ask your system administrator or your webmaster for more information. Since every site is different, those would be the people that would know where it goes. If you are the system administrator and you don't know where it goes, read the documentation for your server software. (What I'm trying to say here is that I'm not going to know what's on your system, so don't ask)

Rename the counter to something sensible and obvious, something like 'counter' would be ideal. (If your system requires it, you can call the counter something like 'counter.cgi' if your server requires the '.cgi' extension to recognize it as a program. The counter will work properly in this case as well)

After you have moved the counter to the proper location, type in the command

perl counter -install

This should output something that looks liks:

Checking to make sure Perl is found properly...
Installing the counter...
   ...making counter executable
   ...making link from counter to counter-ord
   ...making link from counter to counterfiglet
   ...making link from counter to counterfiglet-ord
   ...making link from counter to counterbanner
   ...making link from counter to counterbanner-ord
...done!

If instead of this you get an error message like "perl: Command not found.", that means that you probably don't have Perl installed on your system. You probably want to ask your sysadmin to grab a copy of Perl and install it on your system. (Perl is a very useful tool for many other things besides the counter) If you're having trouble using Perl, why not take a look at the Perl FAQ.

Another possibility is that that the first line of the program doesn't point to the Perl program. The installation process will tell you about this as well. Just follow the directions that are printed out.

At this point, the counter should be working fine. But just to try it out, you should type ./counter on the command line to see if it runs properly.

hq:~/public_html/counter 31 % ./counter
Content-type: text/html

<a href="http://www.webtools.org/counter/">1</a>
hq:~/public_html/counter 32 % ./counter
Content-type: text/html

<a href="http://www.webtools.org/counter/">2</a>
hq:~/public_html/counter 33 % ./counter
Content-type: text/html

<a href="http://www.webtools.org/counter/">3</a>
hq:~/public_html/counter 34 %

where the italics are your prompt, and bold is what you type. It should appear something like this... As long as it doesn't get any errors.


Site-specific options

The counter has many options that you can set in the program itself. In most cases you don't have to change anything, but if you want to make the counter do something different, you want to check out the site-specific configuation options.


Server-Side Includes

Now you must turn on server-side includes. We have simple step-by-step instructions on how you should turn them on.

Full documentation of server-side includes can be found at NCSA's documentation of HTTPD.

The program 'counter' will return the number of the people accessing the page as just a number (1, 2, 3, 4, ...) and the program 'counter-ord' will return an ordinal of that number (1st, 2nd, 3rd, 4th, ...). (there is also documentdation for the full list of supported options)

Calling the program for the first time will create a file ('access_count' by default). This one file will work for everybody on your server.


Usage

Now you must put a special tag into your html file called a server-side include. Assuming that you have the counter installed in your /cgi-bin directory, it would look something like this:

    <!--#exec cgi="/cgi-bin/counter"-->

If you can't get it working, try using the FAQ which answers some common questions.


NetSite Users Read This!!

NetSite is broken in a minor way. Please make sure you read the special instructructions for NetSite users before complaining to me that something doesn't work.


Counter 4.0
Copyright © 1995 George Burgyan
Questions about the counter should go to <counter@webtools.org>
Fill out our feedback form and help make the counter better!


The HTML Access Counter is sponsored by
NetForce Development, Inc.