HTML Access Counter FAQ
A quick run-down of common questions about the access counter
Before you read this file:Make sure you have the latest version of the counter! The newer ones have much better built-in diagnostic capabilities.
- I tried setting it up and it doesn't work!
- The program runs and I put the server-side include in my file, but nothing happens.
- I get an [error processessing directive] where the count should be.
- I tried to get the page, but I get a server error part way through.
- I get a problem with some locking function not working.
- I get an error creating the access_count file.
- The program can't open the counter file.
I tried setting it up and it doesn't work!Does the program itself work? Once this is verified, continue with the rest of this FAQ.
If you used the automatic installation as documented in the installation guide then these should not be a problem, as it checks to make sure everything is as it should be.
Try running counter from the command line. You should see some output like:
Content-type: text/html <a href="http://www.webtools.org/counter">1</a>Each time you run it, the number should increment. If this does not work, here are some things that you can try:
- Make sure that Perl exists on your system. This version requires Perl to run.
- Verify that it has the execute permission set: chmod a+x counter counterord.
The program runs and I put the server-side include in my file, but nothing happens.The server-side include facilities exist only in NCSA httpd and the NetSite server series from Netscape.
The problem is that the server is probably not processing the server-side include. To check, select "View Source" with your browser. If you can see:
<!--#exec cgi="/cgi-bin/counter"-->(or something similar)
where the number is supposed to be, then the server is not processing the
We have written detailed step-by-step
instructions on how to turn on server-side includes properly.
You should also make a change to the 'access.conf' file of the server.
In the allow line, add 'Includes'. This will allow you to use
server-side includes in your documents. Otherwise, you will get a
I get an [error processessing directive] where the count should beThis is a sign that the server is trying to process the server-side include, but something is preventing it. The most common problem is that it simply can't find the counter.
The server-side include you add to your page should look just like a normal URL without the machine part. Something like "/cgi-bin/counter" (or wherever you keep your cgi-bin programs) is what you should be putting in your pages.
Some common paths might be:
I tried to get the page, but I get a server error part way through.If you got to this stage, then you are very close indeed. The server did the server-side include and found the program, however, an error happened while the program was running.
If you got all the way here, and everything above worked, you really shouldn't even get this. Send some email to us at email@example.com and we'll try to fix your problem.
I get a problem with some locking function not workingGet the new version of the counter, it makes provisions for your machine.
I get an error creating the access_count fileMake sure that the user that httpd runs as can create a file in the directory where you told it to put the counter file. Or if you want you can create it yourself and give it permission to access it by:
touch access_count chmod a+rw access_countin the directory where you told it to put it.
The program can't open the counter fileYou probably ran the counter from the command line which created the access_count file. The problem is that the user that httpd runs as can't write to it. To fix it type:
chmod a+rw access_countwhich should fix the problem.
If you still can't get the counter working, send some mail to firstname.lastname@example.org and we'll do the best we can to make it work for you.
Войти под своим именем