Frequently asked questions about the Counter CGI script.
Check file permissions on your data file.
The counter displays dashes when it can't read or write to the data file. Common causes:
The data file needs to be readable and writable by the web server. Set permissions to 666:
chmod 666 /path/to/data/pagename.dat
Check the $data_dir variable in the script. Make sure it points to the correct location where your data files are stored.
Create a new data file with the starting number (usually 0) and set proper permissions.
Yes.
You can use your own custom digit images. Here's how:
0.gif through 9.gif$image_dir variable in the script to point to your images$image_dir = "/images/mycounter/";
Edit the data file directly.
The counter stores the current count in a simple text file. To reset it:
$data_dir/pagename.dat)Yes, use different data file names.
Each page can have its own counter by using a unique data file name. Pass the file name as a parameter:
<img src="/cgi-bin/counter.cgi?page=homepage" alt="Counter">
<img src="/cgi-bin/counter.cgi?page=about" alt="Counter">
<img src="/cgi-bin/counter.cgi?page=contact" alt="Counter">
This will create separate data files: homepage.dat, about.dat, and contact.dat
Questions about the text-based counter
Questions about the Guestbook script
Browse all script FAQs