| |
|
1. What are Server Side Includes?
2. How do I make the counter appear in my HTML document?
3. What does "[TextCounter Fatal Error: This Page Not Found;
Auto-Create Option Disabled]" mean?
4. What does "[TextCounter Fatal Error: This Page Not In Valid URI]" mean?
5. What does "[TextCounter Fatal Error: Could Not Write to File XXX]" mean?
6. What does "[TextCounter Fatal Error: Could Not Increment Counter]" mean? |
|
Short Answer:
Server Side Includes allow for your server to parse your html pages and return certain things in place of your server side include calls.
Long Answer:
Server Side Includes allow you to imbed special tags in order for your server to parse this document and replace these tags with the information you requested to beplaced there, whether it be a CGI script, command, or even an environment variable. This all occurs on the server side, which means that when the document reaches the end user, they won't even know the server side includes were ever used, and if they view source, they won't see any trace of them.
More Information:
Matt Kruse's Server Side Includes Explanation
NCSA HTTPd Tutorial: Server Side Includes (SSI)
Apache module mod_include
|
|
Short Answer:
Perl:
<!--#exec cgi="/url/path/to/counter.pl"-->
<!--#include virtual="/url/path/to/counter.pl"-->
C++:
<!--#exec cgi="/url/path/to/counter"-->
<!--#include virtual="/url/path/to/counter"-->
Long Answer:
This program requires the use of Server Side Includes. This means that if your system is enabled to handle Server Side Includes, you will probably have to rename your pages to end in .shtml. You will then have to use a standard Server Side Include call like the one shown above.
However, if you have renamed your CGI program counter.cgi so it is compatible with your server, just change counter or counter.pl above to counter.cgi.
|
|
Short Answer:
Turn on the auto-create option, generate the count files for the pages you want to allow to have textcounters, then turn off the auto-create option afterwards.
Long Answer:
If you are not the owner of this script, the administrator of the script has the option to disallow auto-creating of counters. Talk to the person who owns the script if you don't have access to modify the auto-create variable.
|
|
Short Answer:
Perl: Try setting the @valid_uri array to contain just '/':
@valid_uri = ('/');
C++: Set num_invalid_uri and num_valid_uri to 0 and clear the values of valid_uri and invalid_uri:
const int num_valid_uri = 0;
const char valid_uri[num_valid_uri][128] = { };
const int num_invalid_uri = 0;
const char invalid_uri[num_invalid_uri][128] = { };
Long Answer:
Perl: If you think this is right, and you still get this error, it may mean your server is not passing the DOCUMENT_URI environment variable, in which case the script probably won't work. However, one way to tell if you have the @valid_uri variable set right is to change this to:
@valid_uri = (".");
Also, make sure the @invalid_uri line is commented out as such:
# @invalid_uri = ('');
If you are still getting this error, then try changing the following line:
&check_uri;
to
# &check_uri;
If the counter still doesn't work, it may not be compatible with your Web Server.
|
|
Short Answer:
This means that when the TextCounter CGI script tried to automatically create your count file for the new web page, it was unable to do so, possibly due to a permissions problem.
Long Answer:
Make sure that the data_dir is chmoded 666 so that the web server has access to write to it. Also make sure that data_dir contains the correct path to this directory.
|
|
Short Answer:
Make sure the permissions didn't get changed on this file and that it still exists.
Long Answer:
This means that the TextCounter program found the file but couldn't open it up and write to it. Try chmoding it 666.
|
| |
| |