You are visitor number MCDLXXIV
This site uses aggressive caching; you may need to clear your browser cache in order to see the counter update.
Like many counters, the Roman Numeral Counter keeps track of how many people have viewed a given web page. This one counts in Roman numerals instead of the typical Arabic numbers. This script should be pretty easy to set up if you've successfully installed an SSI on your page before.
To request assistance or discuss this script, please visit the Discussion Forum.
If you enjoy this script, please rate it at the CGI Resource Index.
- System Requirements
- Installation and Configuration
- Notification of Updated Versions
- Credits and Other Stuff
- Your web server software must support Perl CGI scripts
- Your administrators must allow custom CGI scripts
- Your administrators must allow SSI calls, including #exec cgi
Installation and Configuration
Either download the roman.zip file with everything, or download the script directly as roman.pl. If you download the text version, rename it to roman.pl at some point. Treat the script as straight ASCII text for downloading and editing.
This script has one variable. The variable points to a writable directory that holds your counter data:
$directory = 'data';
After setting this variable, make sure the script is executable and the directory is writable:
chmod 755 roman.pl chmod 777 data
To include a counter on each page, add the following HTML code:
You are visitor number <!--#exec cgi="roman.pl" -->.
You may have to name your files index.shtml instead of index.html. You may have to make the HTML files executable with chmod -R 755 *.html or chmod -R 755 *.shtml. The -R flag is for recursive; this will get all HTML files in your main directory and all sub-directories. You may have to talk to your provider to find out whether SSI is supported on your system.
This script has been designed for easy installation and troubleshooting. There are a finite number of ways that the script can fail, and the more common are addressed here.
If the count is not appearing, choose "View Source" and see whether your SSI tag is present. If so, that means your server is not supporting SSI. There are a few ways to turn it on - talk to your administrator.
If the words [An error occurred while processing this directive] appear, check your SSI tag. The path to the CGI should be equivalent to what you would use for a relative link. For example:
Script is at http://www.provider.com/~user/cgi-bin/roman.pl SSI Call is <!--#exec cgi="/~user/cgi-bin/roman.pl" --> Script is at http://www.provider.com/roman.pl SSI Call is <!--#exec cgi="/roman.pl" -->
The script might also output an error in the form of an HTML comment. If you view-source and see:
<!-- could not write to $Document, permission denied -->
then you will need to make all files in the $directory writable, with chmod -R data.
If all else fails, go to the URL of the roman.pl script itself. If you see a chdir(/path/to/counters/) failed - no such file or directory message, then your variable must be changed to reflect a real directory. If you see a "Document variable not supported" message, that's normal. That's okay.
If you see a 500: Internal Server Error, try to transfer the file as ASCII text or run perl -w roman.pl to find out where the problem is.
If you see a 403: Permission Denied Error, try changing permissions to executable for all (chmod 755 roman.pl).
If you see the "Document variable not supported" message on the web page in place of the count, then you are probably not on an Apache server and this script won't work.
If you see the "Directory Invalid" message on the web page in place of the count, then double-check your directory variable.
Notification of Updated Versions
To receive notification via email when an updated version is released, enter your name and email address:
Credits and Stuff
This script is basically a scaled-down version of Matt Wright's text counter, with most of the advanced features stripped out. Thanks Matt.