Why is it Not Writing to File on Netware 5 Box?

Discussion in 'Perl Misc' started by Chris Abraham, Jul 8, 2003.

  1. Dear Gurus:

    I am having a very frustrating experience with one of Matt's guestbook CGI
    scripts. It was working before in all of its interpretations based on
    Guestbook for the World Wide Web Version 2.1 circa 6/1/95. It was working
    like a champ but not its not. Here's where the Novell Netware server was
    before the upgrade:

    NETWARE 5.1 SERVICE PACK 5 WITH PERL CGI2PERL V 2.00B MARCH 21ST 2001.

    And here is where the server is now:

    NETWARE 5.1 SERVICE PACK 6 WITH PERL 5.8.0 CGI2PERL NLM 3.20B FROM FEB 3RD
    2003.

    I have fears that it has nothing to do with Perl, although the cgi2perl
    interpreter didn't like titles like 8-15-03.pl, but when I fixed that and
    was able to get the primary part of the script working, the 81503.pl script
    would not append the guest book input data to perldocs/81503.htm. The perl
    script walked like a duck and talked like a suck, but it would not quack,
    although it did write the data to the screen, to the browser.

    So, not having a Novell Netware server of any sort, I upgraded my FreeBSD
    box to 5.8.0 and you can see it here:

    http://aei.zdev.org/81503.html

    Which, when you fill it out, goes nicely to:

    http://aei.zdev.org/cgi-bin/81503.pl

    And then logs very nicely to:

    http://aei.zdev.org/81503.htm

    And, aside from changing the local variables and the shebang, it worked like
    a charm, and on 5.8.0 to boot.

    So, here is what I have been doing to try to get it sussed:

    I WAS able to get the PERL SCRIPT to run on the FreeBSD box, the NOVELL
    NETWARE box, and a W2k and XP box running INDIGOPERL (Apache 2, Perl 5.8.0,
    and PHP 4).

    I WAS NOT able to get the PERL SCRIPT to write to the guestbook html file:

    http://aei.zdev.org/81503.htm

    On any of the platforms save the FreeBSD box.

    Here's the perl script. I was thinking that maybe it coule be permissions
    or it could be a difference between the techniques required to open the
    81503.htm, append the html information saved in GUEST, and then closing the
    81503.htm between the BSD box and Novell/Windows that I am not aware of, or
    something to do with permissions. I don't know. I would really like your
    help.

    If you have any ideas, please email me directly (and to this group as well,
    for the benefit of man and knowledge).

    Thanks in advance,

    Chris

    The Perl script is to follow, as I got it, before I localized it for the BSD
    box:

    #################################Begin Code##########################
    #! /usr/local/bin/perl -w

    # ------------------------------------------------------------
    # Guestbook for the WWW, by Matt Wright (12.co.us).
    # This package is Copyright 1995 by Matt Wright.
    # Parts of code taken from:
    # Form-mail.pl, by Reuven M. Lerner ().
    # This package is Copyright 1994 by The Tech.

    # Guestbook is free software; you can redistribute it and/or modify it
    # under the terms of the GNU General Public License as published by the
    # Free Software Foundation; either version 2, or (at your option) any
    # later version.

    # Guestbook is distributed in the hope that it will be useful, but
    # WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    # General Public License for more details.

    # You should have received a copy of the GNU General Public License
    # along with Guestbook; see the file COPYING. If not, write to the Free
    # Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
    # ------------------------------------------------------------

    # Guestbook for the World Wide Web
    # Created by Matt Wright Version 2.1
    # Created on: 4/21 Last Modified: 6/1/95
    # History can be found in the README file.

    # ***************Set Following Variables Before Use!!!*************
    # Set this to your server address
    $server = "http://".$ENV{"SERVER_NAME"}."/";

    # Set this to point to URL style guestbook html file location.
    $guestbookurl = "perldocs/81503.htm";

    # Set this to point to the actual location of the html files.
    $guestbookreal = "sys:/novonyx/suitespot/docs/perldocs/81503.htm";
    $guestlog = "sys:/novonyx/suitespot/docs/perldocs/guestlg2.htm";

    # This points to the relative location of this perl script (this depends
    # on what you specify in srm.cfg
    $cgiurl = "perl/81503.pl";

    # ***************Set Above Variables Before Use!!!*************

    # Set Your Options:
    $mail = 0; # 1 = Yes; 0 = No
    $uselog = 1; # 1 = Yes; 0 = No
    $linkmail = 1; # 1 = Yes; 0 = No
    $separator = 1; # 1 = <hr>; 0 = <p>
    $redirection = 0; # 1 = Yes; 0 = No

    ##############
    # If you answered 1 to $mail you will need to fill out these variables
    below:
    $mailprog = '/usr/lib/sendmail';
    $recipient = '';

    # Get the Date for Entry
    #$date = `date +"%A, %B %d, %Y at %T (%Z)"`;
    # chop($date);
    #$shortdate = `date +"%D %T %Z"`;
    # chop($shortdate);


    # Get the input
    read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'});

    # Split the name-value pairs
    @pairs = split(/&/, $buffer);

    foreach $pair (@pairs)
    {
    ($name, $value) = split(/=/, $pair);

    # Un-Webify plus signs and %-encoding
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;

    # Stop people from using subshells to execute commands
    # Not a big deal when using sendmail, but very important
    # when using UCB mail (aka mailx).
    # $value =~ s/~!/ ~!/g;

    # Uncomment for debugging purposes
    # print "Setting $name to $value<P>";

    $FORM{$name} = $value;
    }

    # Print the Blank Response Subroutines

    &no_name unless $FORM{'realname'};

    # Begin the Editing of the Guestbook File
    open (FILE,"$guestbookreal");
    @LINES=<FILE>;
    close(FILE);
    $SIZE=@LINES;

    # Open Link File to Output
    open (GUEST,">$guestbookreal");

    for ($i=0;$i<=$SIZE;$i++) {
    $_=$LINES[$i];
    if (/<META begin>/) {
    print GUEST "<META begin>\n";
    print GUEST "<b>$FORM{'periodending'}</b><p>\n";
    print GUEST "Employee Name: &#160 <b>$FORM{'realname'}</b>";
    if ( $FORM{'username'} ){
    if ($linkmail eq '1') {
    print GUEST " (<a
    href=\"mailto:$FORM{'username'}\">$FORM{'username'})</a>";
    }
    else {
    print GUEST " ($FORM{'username'})";
    }
    }
    print GUEST "<br>\n";
    if ( $FORM{'costcenter'} ){
    print GUEST "Cost Center: &#160 <b>$FORM{'costcenter'}</b><br>\n";
    print GUEST "<br>\n";
    print GUEST "<b><u>Date and Work Status</u></b><br>\n";
    }
    if ( $FORM{'day1'} ){
    print GUEST "<b> 01: </b>$FORM{'day1'} \n";
    }
    if ( $FORM{'day2'} ){
    print GUEST "<b> 02: </b>$FORM{'day2'} \n";
    }
    if ( $FORM{'day3'} ){
    print GUEST "<b> 03: </b>$FORM{'day3'} \n";
    }
    if ( $FORM{'day4'} ){
    print GUEST "<b> 04: </b>$FORM{'day4'} \n";
    }
    if ( $FORM{'day5'} ){
    print GUEST "<b> 05: </b>$FORM{'day5'} \n";
    }
    if ( $FORM{'day6'} ){
    print GUEST "<br><b> 06: </b>$FORM{'day6'} \n";
    }
    if ( $FORM{'day7'} ){
    print GUEST "<b> 07: </b>$FORM{'day7'} \n";
    }
    if ( $FORM{'day8'} ){
    print GUEST "<b> 08: </b>$FORM{'day8'} \n";
    }
    if ( $FORM{'day9'} ){
    print GUEST "<b> 09: </b>$FORM{'day9'} \n";
    }
    if ( $FORM{'day10'} ){
    print GUEST "<b> 10: </b>$FORM{'day10'} \n";
    }
    if ( $FORM{'day11'} ){
    print GUEST "<br><b> 11: </b>$FORM{'day11'} \n";
    }
    if ( $FORM{'day12'} ){
    print GUEST "<b> 12: </b>$FORM{'day12'} \n";
    }
    if ( $FORM{'day13'} ){
    print GUEST "<b> 13: </b>$FORM{'day13'} \n";
    }
    if ( $FORM{'day14'} ){
    print GUEST "<b> 14: </b>$FORM{'day14'} \n";
    }
    if ( $FORM{'day15'} ){
    print GUEST "<b> 15: </b>$FORM{'day15'} \n";
    }
    if ( $FORM{'day16'} ){
    print GUEST "<b> 16: </b>$FORM{'day16'} \n";
    }
    if ( $FORM{'day17'} ){
    print GUEST "<b> 17: </b>$FORM{'day17'} \n";
    }
    if ( $FORM{'day18'} ){
    print GUEST "<b> 18: </b>$FORM{'day18'} \n";
    }
    if ( $FORM{'day19'} ){
    print GUEST "<b> 19: </b>$FORM{'day19'} \n";
    }
    if ( $FORM{'day20'} ){
    print GUEST "<b> 20: </b>$FORM{'day20'} \n";
    }
    if ( $FORM{'day21'} ){
    print GUEST "<br><b> 21: </b>$FORM{'day21'} \n";
    }
    if ( $FORM{'day22'} ){
    print GUEST "<b> 22: </b>$FORM{'day22'} \n";
    }
    if ( $FORM{'day23'} ){
    print GUEST "<b> 23: </b>$FORM{'day23'} \n";
    }
    if ( $FORM{'day24'} ){
    print GUEST "<b> 24: </b>$FORM{'day24'} \n";
    }
    if ( $FORM{'day25'} ){
    print GUEST "<b> 25: </b>$FORM{'day25'} \n";
    }
    if ( $FORM{'day26'} ){
    print GUEST "<br><b> 26: </b>$FORM{'day26'} \n";
    }
    if ( $FORM{'day27'} ){
    print GUEST "<b> 27: </b>$FORM{'day27'} \n";
    }
    if ( $FORM{'day28'} ){
    print GUEST "<b> 28: </b>$FORM{'day28'} \n";
    }
    if ( $FORM{'day29'} ){
    print GUEST "<b> 29: </b>$FORM{'day29'} \n";
    }
    if ( $FORM{'day30'} ){
    print GUEST "<b> 30: </b>$FORM{'day30'} \n";
    }
    if ( $FORM{'day31'} ){
    print GUEST "<b> 31: </b>$FORM{'day31'} \n";
    }
    print GUEST "<br>\n";
    if ( $FORM{'vacation'} ){
    print GUEST "<br>Vacation Hours: $FORM{'vacation'}<br>\n";
    }
    if ( $FORM{'sick'} ){
    print GUEST "<br>Sick Hours: $FORM{'sick'}<br>\n";
    }
    if ( $FORM{'other'} ){
    print GUEST "<br>Other (Explain): $FORM{'other'}<br>\n";
    }
    print GUEST "<br><b><u>Project Allocation Summary</u></b><br>\n";
    if ( $FORM{'project1'} ){
    print GUEST "Project: <b>$FORM{'project1'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour1'} ){
    print GUEST "Hours: <b>$FORM{'hour1'}</b><br>\n";
    }
    if ( $FORM{'project2'} ){
    print GUEST "Project: <b>$FORM{'project2'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour2'} ){
    print GUEST "Hours: <b>$FORM{'hour2'}</b><br>\n";
    }
    if ( $FORM{'project3'} ){
    print GUEST "Project: <b>$FORM{'project3'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour3'} ){
    print GUEST "Hours: <b>$FORM{'hour3'}</b><br>\n";
    }
    if ( $FORM{'project4'} ){
    print GUEST "Project: <b>$FORM{'project4'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour4'} ){
    print GUEST "Hours: <b>$FORM{'hour4'}</b><br>\n";
    }
    if ( $FORM{'project5'} ){
    print GUEST "Project: <b>$FORM{'project5'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour5'} ){
    print GUEST "Hours: <b>$FORM{'hour5'}</b><br>\n";
    }
    if ( $FORM{'project6'} ){
    print GUEST "Project: <b>$FORM{'project6'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour6'} ){
    print GUEST "Hours: <b>$FORM{'hour6'}</b><br>\n";
    }
    if ( $FORM{'project7'} ){
    print GUEST "Project: <b>$FORM{'project7'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour7'} ){
    print GUEST "Hours: <b>$FORM{'hour7'}</b><br>\n";
    }
    if ( $FORM{'project8'} ){
    print GUEST "Project: <b>$FORM{'project8'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour8'} ){
    print GUEST "Hours: <b>$FORM{'hour8'}</b><br>\n";
    }
    if ( $FORM{'project9'} ){
    print GUEST "Project: <b>$FORM{'project9'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour9'} ){
    print GUEST "Hours: <b>$FORM{'hour9'}</b><br>\n";
    }
    if ( $FORM{'project10'} ){
    print GUEST "Project: <b>$FORM{'project10'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour10'} ){
    print GUEST "Hours: <b>$FORM{'hour10'}</b><br>\n";
    }
    if ( $FORM{'project11'} ){
    print GUEST "Project: <b>$FORM{'project11'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour11'} ){
    print GUEST "Hours: <b>$FORM{'hour11'}</b><br>\n";
    }
    if ( $FORM{'project12'} ){
    print GUEST "Project: <b>$FORM{'project12'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour12'} ){
    print GUEST "Hours: <b>$FORM{'hour12'}</b><br>\n";
    }
    if ( $FORM{'comments'} ){
    print GUEST "<br>Comments: <b>$FORM{'comments'}</b><br>\n";
    }
    if ($separator eq '1') {
    print GUEST " - $date<hr>\n\n";
    }
    else {
    print GUEST " - $date<p>\n\n";
    }
    }
    else { print GUEST $_; }
    }
    close (GUEST);

    # Log The Entry
    if ($uselog eq '1') {
    open (LOG, ">>$guestlog");
    print LOG "$ENV{'REMOTE_HOST'} - [$FORM{'username'}]<br>\n";
    close (LOG);
    }

    ##############
    # Sub Routines


    sub no_name
    {
    print "Content-type: text/html\n\n";
    print "<html><head><title>No Name</title></head>\n";
    print "<body><h2>You didn't enter your name. Therefore, your timesheet can
    not be submitted. Please press the <b>BACK</b> button to return to the
    form.</h2>\n";
    print "</body></html>\n";

    # Log The Error
    if ($uselog eq '1') {
    open (LOG, ">>$guestlog");
    print LOG "$ENV{'REMOTE_HOST'} - [$shortdate] <b>ERR</b> - No Name<br>\n";
    close (LOG);
    }
    exit;
    }

    #########
    # Options

    # Mail Option
    if ($mail eq '1') {
    open (MAIL, "|$mailprog $recipient") || die "Can't open $mailprog!\n";
    print MAIL "Reply-to: $FORM{'username'} ($FORM{'realname'}\n";
    print MAIL "From: $FORM{'username'} ($FORM{'realname'}\n";
    print MAIL "Subject: Entry to Guest Book\n\n";
    print MAIL "You have a new entry in your guest book:\n\n";
    print MAIL
    "------------------------------------------------------------\n";
    print MAIL "$FORM{'comments'}\n";
    print MAIL "$FORM{'realname'}";
    if ( $FORM{'username'} ){
    print MAIL " ($FORM{'username'})";
    }
    print MAIL "\n";
    if ( $FORM{'city'} ){
    print MAIL "$FORM{'city'},";
    }
    if ( $FORM{'state'} ){
    print MAIL " $FORM{'state'}";
    }
    if ( $FORM{'country'} ){
    print MAIL " $FORM{'country'}";
    }
    print MAIL " - $date\n";
    print MAIL "----------------------------------------------------------\n";
    close (MAIL);
    }

    # Print Out Initial Output Location Heading
    if ($redirection eq '1') {
    print "Location: $server$guestbookurl\n\n";
    }
    else { &redirection }

    # Redirection Option
    sub redirection
    {
    # Print Beginning of HTML
    print "Content-Type: text/html\n\n";
    print "<html><head><title>Thank You</title></head>\n";
    print "<body><h1>Thank You</h1>\n";

    # Print Response
    print "Here is what you submitted to Accounting:<hr>\n";
    print "<b>$FORM{'periodending'}</b><br>\n";
    print "<b>$FORM{'timesheetsdue'}</b><p>\n";
    print "Employee Name: <b>$FORM{'realname'}</b>";
    if ( $FORM{'username'} ){
    if ($linkmail eq '1') {
    print " (<a
    href=\"mailto:$FORM{'username'}\">$FORM{'username'}</a>)";
    }
    else { print " ($FORM{'username'})" }
    }
    print "<br>\n";
    if ( $FORM{'costcenter'} ){
    print "Cost Center: <b>$FORM{'costcenter'}</b><p>\n";
    print "<b><u>Date and Work Status</u></b><br>\n";
    }
    if ( $FORM{'day1'} ){
    print "<b> 01: </b>$FORM{'day1'} \n";
    }
    if ( $FORM{'day2'} ){
    print "<b> 02: </b>$FORM{'day2'} \n";
    }
    if ( $FORM{'day3'} ){
    print "<b> 03: </b>$FORM{'day3'} \n";
    }
    if ( $FORM{'day4'} ){
    print "<b> 04: </b>$FORM{'day4'} \n";
    }
    if ( $FORM{'day5'} ){
    print "<b> 05: </b>$FORM{'day5'} \n";
    }
    if ( $FORM{'day6'} ){
    print "<br><b> 06: </b>$FORM{'day6'} \n";
    }
    if ( $FORM{'day7'} ){
    print "<b> 07: </b>$FORM{'day7'} \n";
    }
    if ( $FORM{'day8'} ){
    print "<b> 08: </b>$FORM{'day8'} \n";
    }
    if ( $FORM{'day9'} ){
    print "<b> 09: </b>$FORM{'day9'} \n";
    }
    if ( $FORM{'day10'} ){
    print "<b> 10: </b>$FORM{'day10'}\n";
    }
    if ( $FORM{'day11'} ){
    print "<br><b> 11: </b>$FORM{'day11'} \n";
    }
    if ( $FORM{'day12'} ){
    print "<b> 12: </b>$FORM{'day12'} \n";
    }
    if ( $FORM{'day13'} ){
    print "<b> 13: </b>$FORM{'day13'} \n";
    }
    if ( $FORM{'day14'} ){
    print "<b> 14: </b>$FORM{'day14'} \n";
    }
    if ( $FORM{'day15'} ){
    print "<b> 15: </b>$FORM{'day15'} \n";
    }
    if ( $FORM{'day16'} ){
    print "<b> 16: </b>$FORM{'day16'} \n";
    }
    if ( $FORM{'day17'} ){
    print "<b> 17: </b>$FORM{'day17'} \n";
    }
    if ( $FORM{'day18'} ){
    print "<b> 18: </b>$FORM{'day18'} \n";
    }
    if ( $FORM{'day19'} ){
    print "<b> 19: </b>$FORM{'day19'} \n";
    }
    if ( $FORM{'day20'} ){
    print "<b> 20: </b>$FORM{'day20'} \n";
    }
    if ( $FORM{'day21'} ){
    print "<br><b> 21: </b>$FORM{'day21'} \n";
    }
    if ( $FORM{'day22'} ){
    print "<b> 22: </b>$FORM{'day22'} \n";
    }
    if ( $FORM{'day23'} ){
    print "<b> 23: </b>$FORM{'day23'} \n";
    }
    if ( $FORM{'day24'} ){
    print "<b> 24: </b>$FORM{'day24'} \n";
    }
    if ( $FORM{'day25'} ){
    print "<b> 25: </b>$FORM{'day25'} \n";
    }
    if ( $FORM{'day26'} ){
    print "<br><b> 26: </b>$FORM{'day26'} \n";
    }
    if ( $FORM{'day27'} ){
    print "<b> 27: </b>$FORM{'day27'} \n";
    }
    if ( $FORM{'day28'} ){
    print "<b> 28: </b>$FORM{'day28'} \n";
    }
    if ( $FORM{'day29'} ){
    print "<b> 29: </b>$FORM{'day29'} \n";
    }
    if ( $FORM{'day30'} ){
    print "<b> 30: </b>$FORM{'day30'} \n";
    }
    if ( $FORM{'day31'} ){
    print "<b> 31: </b>$FORM{'day31'} \n";
    }
    print "<br>\n";
    if ( $FORM{'vacation'} ){
    print "<br>Vacation Hours: $FORM{'vacation'}\n";
    }
    if ( $FORM{'sick'} ){
    print "<br>Sick Hours: $FORM{'sick'}\n";
    }
    if ( $FORM{'other'} ){
    print "<br>Other (Explain): $FORM{'other'}\n";
    }
    print "<br><br><b><u>Project Allocation Summary</u></b><br>\n";
    if ( $FORM{'project1'} ){
    print "Project: <b>$FORM{'project1'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour1'} ){
    print "Hours: <b>$FORM{'hour1'}</b><br>\n";
    }
    if ( $FORM{'project2'} ){
    print "Project: <b>$FORM{'project2'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour2'} ){
    print "Hours: <b>$FORM{'hour2'}</b><br>\n";
    }
    if ( $FORM{'project3'} ){
    print "Project: <b>$FORM{'project3'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour3'} ){
    print "Hours: <b>$FORM{'hour3'}</b><br>\n";
    }
    if ( $FORM{'project4'} ){
    print "Project: <b>$FORM{'project4'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour4'} ){
    print "Hours: <b>$FORM{'hour4'}</b><br>\n";
    }
    if ( $FORM{'project5'} ){
    print "Project: <b>$FORM{'project5'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour5'} ){
    print "Hours: <b>$FORM{'hour5'}</b><br>\n";
    }
    if ( $FORM{'project6'} ){
    print "Project: <b>$FORM{'project6'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour6'} ){
    print "Hours: <b>$FORM{'hour6'}</b><br>\n";
    }
    if ( $FORM{'project7'} ){
    print "Project: <b>$FORM{'project7'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour7'} ){
    print "Hours: <b>$FORM{'hour7'}</b><br>\n";
    }
    if ( $FORM{'project8'} ){
    print "Project: <b>$FORM{'project8'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour8'} ){
    print "Hours: <b>$FORM{'hour8'}</b><br>\n";
    }
    if ( $FORM{'project9'} ){
    print "Project: <b>$FORM{'project9'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour9'} ){
    print "Hours: <b>$FORM{'hour9'}</b><br>\n";
    }
    if ( $FORM{'project10'} ){
    print "Project: <b>$FORM{'project10'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour10'} ){
    print "Hours: <b>$FORM{'hour10'}</b><br>\n";
    }
    if ( $FORM{'project11'} ){
    print "Project: <b>$FORM{'project11'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour11'} ){
    print "Hours: <b>$FORM{'hour11'}</b><br>\n";
    }
    if ( $FORM{'project12'} ){
    print "Project: <b>$FORM{'project12'}</b> &#160 &#160 \n";
    }
    if ( $FORM{'hour12'} ){
    print "Hours: <b>$FORM{'hour12'}</b><br>\n";
    }
    print "<br>\n";
    #print " - $date<p>\n";

    # Print End of HTML
    print "Comments: <b>$FORM{'comments'}</b><br>\n";
    print "<hr>\n";
    print " Back to <a href=\"http://intranet\"><b>AEI Intranet
    Site</b></a><p>";
    print "</body></html>\n";
    exit;
    }
    #################################End Code##########################
    Chris Abraham, Jul 8, 2003
    #1
    1. Advertising

  2. "Chris Abraham" <> writes:
    > I am having a very frustrating experience with one of Matt's guestbook CGI
    > scripts.


    This one's easy: Don't Do That(tm). Matt's scripts are universally
    acknowledged (even by Matt himself) to be poorly written, buggy, and a
    pain in the arse to maintain. Check out the replacements at
    http://sourceforge.net/projects/nms-cgi/ instead.

    -=Eric
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton.
    Eric Schwartz, Jul 8, 2003
    #2
    1. Advertising

  3. Chris Abraham

    Jay Tilton Guest

    "Chris Abraham" <> wrote:

    : I have fears that it has nothing to do with Perl,

    Probably right.

    : I WAS NOT able to get the PERL SCRIPT to write to the guestbook html file:

    : The Perl script is to follow, as I got it, before I localized it for the BSD
    : box:

    [snip]
    : open (FILE,"$guestbookreal");
    [...]
    : open (GUEST,">$guestbookreal");
    [...]
    : open (LOG, ">>$guestlog");
    [...]
    : open (LOG, ">>$guestlog");
    [...]

    Always check the return from open() for success. If it fails, have
    the program tell you what caused the failure.

    open(FILE, $filename) or die "Cannot open '$filename': $!";

    Do you really want to trust a program that doesn't handle this most
    basic of exceptions? Drop it and find a competently written
    replacement.

    Unrelated:
    "Robert" <> will benefit from the same advice, if he can
    stop being a twit long enough to do some reading.
    Jay Tilton, Jul 9, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGF5bmk=?=

    .Net Under Novell Netware Environment

    =?Utf-8?B?ZGF5bmk=?=, Jun 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    310
    Trevor Benedict R
    Jun 18, 2004
  2. =?Utf-8?B?TWlybw==?=

    Read Access database on Novell Netware 6 from ASPX

    =?Utf-8?B?TWlybw==?=, Mar 30, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    489
    =?Utf-8?B?TWlybw==?=
    Mar 30, 2005
  3. =?Utf-8?B?TWlybw==?=

    IIS5 authentication on windows 2000 with Netware

    =?Utf-8?B?TWlybw==?=, Nov 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    354
    =?Utf-8?B?TWlybw==?=
    Nov 17, 2005
  4. Jeff Davey

    Python 2.3.2 & Netware

    Jeff Davey, Nov 11, 2003, in forum: Python
    Replies:
    7
    Views:
    361
    Jeff Davey
    Nov 13, 2003
  5. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,756
    Smokey Grindel
    Dec 2, 2006
Loading...

Share This Page