Helpful Information
 
 
Category: vBulletin.org Forum
[RELEASE vB2.02beta] LiveCounter Classic for vbb 2.0

Hi all this is our 3rd hack now for vbb2 let me more what you think.

Its a on the fly counter (no need to refresh for an update)

This as only been tested on v2.0

Have fun

This happened to me but for the rest of you if you find the problem where it won't go past 0 do this. The file livecntr.dat move it to the same directory as where the pl files are. The instructions aren't quick clear on that.

If you get an unexpected result, the following troubleshooting tips may help.

If you don't run your own web server, keep in mind that your best resource for web server related questions (such as "do I have CGI access," "what is my CGI directory," "can I TELNET to my server," "how do I run Perl5 scripts," etc.) is most likely your Internet Service Provider (ISP). This is because specific details depend on the way your web server is configured by your ISP.

••• My browser is displaying the content of the script file (instead of an incrementing number) whenever I try to test LiveCounter scripts.

OR

My browser is prompting me to save a file whenever I try to test LiveCounter scripts.

Reason:

This means your LiveCounter scripts aren't getting executed.

Solution:

Verify that you have CGI access on your web server.
Make sure that you properly installed LiveCounter scripts.
••• ERROR: "document contains no data"

Reason:

It's difficult to pin point this message to a single cause, but this usually means:

1. the script was unable to complete its function, possibly due to an internal error such as an inaccessible file, missing headers, incorrect Perl interpreter version, etc., OR

2. the scripts aren't properly installed, OR

3. server mis-configuration, OR

4. some other unknown error.

Solution:

Make sure that you properly installed LiveCounter scripts.
Verify that the livecntr.dat file has full read and write access.
If you're on a UNIX server, check if the path to the Perl interpreter is correct (the very first line of each script)
If possible (and applicable), upgrade to Perl 5 or higher.
If you're on a Windows NT server (or a workstation, if using Peer Web Services), you must follow all the steps as documented (including the registry modification).
••• ERROR: "file not found"

Reason:

Invalid path/URL/address.

Solution:

Make sure that you uploaded your files to the correct directory.
The directory structure that you see when you TELNET or FTP to your server may be different from the directory structure you "see" when you browse your web pages.
Some servers use case sensitive file names.
Use lowercase file names for all LiveCounter related files except LiveCounter.class file. LiveCounter.class file must be uploaded to the web server as LiveCounter.class (uppercase L and C), if your web server is case sensitive.
If you had to rename your scripts in order to make them executable (changed from livecnt1.pl to livecnt1.cgi for example), be sure to use the "new" file names.
••• LiveCounter scripts are always returning 0 (c0=0) during testing.

Reason:

1. livecntr.dat file may be missing from the scripts directory (the directory where LiveCounter Classic scripts are installed).

2. livecntr.dat file may not have the necessary file access rights such as read, write and update rights.

Solution:

Create an empty text file in the scripts directory named livecntr.dat as documented in the setup instructions for your particular web server platform.

UNIX users can use the "touch" command to create empty files.

Windows users do not need to explicitly create the livecntr.dat file when using the default settings of the operating system. However, you may need to manually create this file if the scripts directory has special file access/creation attributes.

If the livecntr.dat file already exists in the scripts directory, make sure that it has read, write and update file access rights set. If you're not sure which settings are required (depending on the server), start off by giving livecntr.dat file full access rights and then remove extra rights after testing the scripts.

UNIX users can use the "chmod" command to change file attributes.

Windows users can use the "File Manager | Security" or the "Windows Explorer | Properties... | Security."
••• LiveCounter scripts are returning the correct results when I test them as documented (incrementing count), but the counter display stays at 0 (or multiple 0s).

Reason:

1. Most likely there's an error in the LiveCounter HTML tags.

2. The second most common reason is that not all the LiveCounter files are being served from the same server.

Solution:

Check your LiveCounter HTML tags. Make sure that none of the quotes are missing, for example.
If you had to rename your scripts to *.cgi from *.pl to get them to execute, make sure that you changed your HTML tags to reflect this change. For example, change all instances of ".pl" to ".cgi"
Certain implementations of Java will generate security exceptions (errors) if you retrieve LiveCounter files from different sources/servers. For example, if your LiveCounter.class file resides on www.myserver_one.com, all other LiveCounter related files must reside on that same server. You cannot serve CGI scripts from one server and other LiveCounter files (borders, digigits, Java applet, etc.) from another.
••• ERROR: "Applet exception: class LiveCounter could not be loaded"
••• ERROR: "Applet can't start: error: java.lang.ClasFormatError"
••• ERROR: "Applet can't start: error: java.lang.ClassFormatError: bad magic number"

Reason:

Most likely your LiveCounter.class file is not at the location you specified or it is corrupted.

Solution:

Make sure that the LiveCounter.class file is in the location specified in the "code" parameter. For example if it's set to "http://myhost.com/my_path/" the LiveCounter.class file must be at: "http://myhost.com/my_path/LiveCounter.class"
Make sure that you used the proper method of downloading binary files (according to your browser).
Be sure to use the BINARY mode when transferring (uploading) LiveCounter.class file to your FTP site (and/or web server).
Check the size of the downloaded LiveCounter.class file. It should be between 9K - 11K.
Download the LiveCounter.class file again and upload it back to your web server and refresh your browser cache.
Do not save the .class file inside a cgi-bin or other script directory. It must be in the root directory of the web site or other directory without special attributes such as cgi-bin.
Make sure that the "code" parameter inside the <applet ...> tag is exactly "LiveCounter.class" (case sensitive and does not have any spaces before or after the name inside double quotes):

code="LiveCounter.class"

Clear your browser's cache (memory and disk), and restart it before testing your counter again.


••• My counter is properly working on all browsers except Internet Explorer 4.x. Internet Explorer 4.x is displaying 0s.

Reason:

This is because of certain bugs in Internet Explorer 4.x when interacting with HTTP/1.1 web servers such as Apache.

Solution:

If your counter is in fact properly working on all other browsers except IE 4.x (including older versions of IE), try adding following parameter to your counter tags one at a time. If adding the first parameter doesn't make a difference, remove it and add the second parameter, and so on.

<param name="http10" value="0">

<param name="http10" value="1">

<param name="absurl" value="1">


••• I've installed Perl CGI scripts before without a problem. But I'm having trouble installing LiveCounter Classic scripts. What did I overlook?

Reason:

Although the reason could be anything, most likely reason is that you may not have transferred the scripts to your web server in ASCII mode.

Solution:

Try to upload the scripts to your web server using the ASCII FTP protocol. Or, if you're on an UNIX web server and if you're familiar with converting DOS/Windows text files to UNIX text files, do so. For example, you could load the scripts to the "vi" editor and resave, or run the following sample command on all script files:

tr -d "\015\032" <dosfile >unixfile

I have made a graphical counter as well, or in other words, used an existing script.

You can see it working at

http://www.anyquestions.f2s.com/

Here you also find the original complete documentation and source code.

Hope you like it and can do something usefull with it.

Unfortunately it seems that the MySql connection on their server is not 100% reliable, so sometimes it shows error #10 instead of the pagecounter, sorry for this.










privacy (GDPR)