---*** Thanks for trying out trivia.pl version 1.0a ***--- Descripton: This script accepts an answer to a question from an HTML form. Successful responses are rewarded by allowing the name and e-mail address to be added to a hall of fame log. With this readme file you should have received: trivia.pl the cgi script referred to as the pl file hallfame.html the log file trivia.html the page with a question gnu.html the GNU general public license Copyright: Copyright information is contained in the header of the pl file which may be read by opening up the file in a text editor like the one you are using to read this. This software is covered by the GNU General Public License which you should have received along with the software. Installation: 1.) UNIX 2.) NT Quick Start instructions can be found in the pl file header. 1.) ***** UNIX Installation **** a.) The first line of the trivia.pl script reads: #!/usr/local/bin/perl. However, if your server has a different path to Perl you must replace /usr/local/bin/perl with the correct path. To locate Perl on your server, type: 'which perl'(without the quotes) at your shell prompt. [note] /usr/bin/perl is also a very common path. b.) A few variables are user setable and are located just below the header in the pl file: $question is the text of the question asked on the html page, trivia.html, setting it here allows the script to generate a new html page with a new question. This is done by running the script with the h option at the shell prompt> perl trivia.pl h $solution is the correct answer that you want the script to accept. Type this in lower case. The script will accept the answer in either upper or lower case or in mixed case but the solution must be set in all lower case letters, and yes, spelling counts! Other than case the answer given must exactly match the solution to be considered correct. Spaces are permitted but must match in answer and solution. $comment is the greeting given to those who answer the question correctly. It appears at the top of the page that successful answerers see next. [note] Don't forget the quotes when setting these variables. $logfile is the name of your log file. The default name is hallfame.html If it is in a different directory than the scripts, the path must be included. The $unix variable must be set to "1" for unix systems and "0" for NT. $datepath is the path to the date command on your server. It normally reads: $datepath = "/bin/date"; but may be different on your server. Type: 'which date' at the Unix shell prompt to locate it on your server. [note] Be careful not to omit the semicolons at the end of each line when setting all variables. c.) Transfer the pl file to a directory from which you can run cgi. On some servers your cgi script must be in the cgi-bin directory in order to be executed. Make sure that you upload the script with your uploading software set to ASCII or Text mode NOT Binary mode. d.) Make sure the permission to execute the pl file is set. On Unix servers, from your shell prompt, cd to the directory where the files are located, and type: chmod 755 trivia.pl to correctly set the permission. e.) Transfer the hallfame.html file to the same directory or to a directory that you specified in the path portion of the $logfile variable. Make sure the permission to read and write is set for the logfile. On Unix servers: cd to the directory where the file is located, and type: chmod 666 hallfame.html DO NOT remove the comment, , from the log file? f.) trivia.html should be placed in the same directory as the scripts. If it is placed elsewhere change the action attribute of the form element to reflect the new location. 2.) ***** NT Installation ***** This script requires ctime.pl, found with all recent distributions of Perl, to get the date and time on NT servers. a.) A few variables are user setable and are located just below the header in the pl files. $question is the text of the question asked on the html page, trivia.html, setting it here allows the script to generate a new html page with a new question. This is done by running the script with the h option. You must be able to run the script from a command line to use this feature. Otherwise you can change the question directly in the trivia.html file $solution is the correct answer that you want the script to accept. Type this in lower case. The script will accept the answer in either upper or lower case or in mixed case but the solution must be set in all lower case letters, and yes, spelling counts! Other than case the answer given must exactly match the solution to be considered correct. Spaces are permitted but must match in answer and solution. $comment is the greeting given to those who answer the question correctly. It appears at the top of the page that successful answerers see next. [note] Don't forget the quotes when setting these variables. $logfile is the name of your log file. The default name is hallfame.html If it is in a different directory than the scripts, the path must be included. The $unix variable must be set to "1" for unix systems and "0" for NT. $datepath is only important on UNIX servers, for NT servers its value does not matter. [note] Be careful not to omit the semicolons at the end of each line when setting all variables. c.) Transfer the pl file to a directory from which you can run cgi. On some servers your cgi script must be in the cgi-bin directory in order to be executed. Make sure that you upload the script with your uploading software set to ASCII or Text mode NOT Binary mode. d.) Make sure the permission to execute the pl file is set. If you are not able to set the permission yourself, contact your system administrator or web presence provider. e.) Transfer the hallfame.html file to the same directory or to a directory that you specified in the path portion of the $logfile variable. Make sure the permission to read and write is set for the logfile. DO NOT remove the comment, , from the log file? f.) trivia.html should be placed in the same directory as the scripts. If it is placed elsewhere change the action attribute of the form to reflect the new location. Support: I can offer only limited support for this software and only for an indefinite period of time. Please carefully read this file and visit the home page http://theaction.com/scripts before contacting me for help. If your problem involves html rather than cgi, please consult some of the numerous sources of info on the web first.Feedback: All comments, bug discoveries, reports, and other feedback should be directed to scripts@theaction.com Please include the script name and version # in all correspondence. If you find that this script works/doesn't work on an OS or server not listed on the web site. Please let me know the OS and server names and versions.