The BeholderBoard FAQ

BeholderBoard logo

If you have a problem or a question please read the readme and check these Frequently Asked Questions.

The BeholderBoard was released in 1999, and is no longer supported.

The Programming Republic of Perl
Fix 1: Don't put a number in $DATAFNAME

By default the script looks for files called board???.txt because that's the setting of the $DATAFNAME variable ("board.txt"). Note that board.txt is not a file — it's just a filename template, and the script inserts the three digits before the dot (.). Therefore if you have changed the setting to a filename such as...

   $DATAFNAME = 'board001.txt';  # wrong!

...it will look for board001???.txt, which probably isn't what you meant. Revert to something like...

   $DATAFNAME = 'board.txt';    # better

By the way, $DATAFNAME won't work as a template if it doesn't have one "." in it.

Fix 2: Lower Case Filenames

Check that the file really is called board001.txt and not Board001.txt — it must be lower case. Read the following anyway, to be sure.

The search is case sensitive. This is what you'd expect in Unixland, but if you're running on a Windows platform beware of Mr Gate's nasty habit of silently capitalising the initial letter of the file name. Board123.txt, for example, won't work. The simple solution to this is to force lower case filenames when you create the data files.

If you are familiar with Perl, and you don't like the simple solution, you can instead make the file search case insensitive by adding the i option at the end of the regular expression that grep uses on the file list. This is line 770 of the script, which would then read:

....sort grep/^$prefix\d\d\d$suffix$/i,...

Don't do this if you're running on a Unix system, because if you do you can end up with board001.txt and Board001.txt coexisting, which you don't want.

Alternatively, set the value of $DATAFNAME to have a capitalised initial if your data files always have one.

Fix 3: $DATAPATH setting

The script looks in the $DATAPATH directory for any files called board???.txt, where ??? are three digits (i.e. 000 through to 999). By default the $DATAPATH directory is blank, which generally means it will look for the board???.txt files in the same directory that the script is in.

However, this might not work if your server is not configured to consider the script's location as the default directory, especially if you have put the script or the files in a subdirectory of the cgi-bin (which you may do, of course). In this case, the comment in the script which says that $DATAPATH is relative to this script should be ignored — instead it's relative to the current working directory.

"Normal" behaviour for server cgi seems to be to inherit the path of the script (in this case, the board.pl script) as its current working directory, which is what the BeholderBoard anticipates. However, if your server doesn't do this, then it's almost certainly using cgi-bin itself as the current working directory instead. The default set-up ought to work in both cases, because everything is piled into the cgi-bin directory anyway, but if you have been orderly enough to use (for example) a subdirectory called cgi-bin/mychess, then the path setting will either be $DATAPATH="" (try this first) or else $DATAPATH="mychess". You probably never want to have any /'s in there, by the way.

Bear in mind, too, that your cgi-bin might not be called cgi-bin.

Fix 4: Revert to Default Set-up

If things go really astray, you should try sticking to the default settings to make your life a little bit easier, at least to start with. The default set-up is a file system like this:

  • cgi-bin containing...
    • script (board.pl)
    • data files (board001.txt, board002.txt...)
  • server-root containing...
    • chess subdirectory, containing...
      • graphics (bbb.gif,...,wrw.gif)
      • index.html

Back to the BeholderBoard