Gossamer Forum
Home : Products : DBMan : Installation :

Getting Error - Help

Quote Reply
Getting Error - Help
I was using JDeni's configuator to set up my database, hoping that it would make it easier on me. It gave me an error, so I went through I did it all myself although it keeps giving me an error. This is the information and things that I changed when the error occurred, it was when I changed the html.pl file. The default.cfg file when uploaded to the new edits worked, though when I changed the html.pl file to go along with what I wanted I got an error. Here is what I put:

Quote:

##########################################################
## Record Layout ##
##########################################################
sub html_record_form {
# --------------------------------------------------------
# The form fields that will be displayed each time a record is
# edited (including searching). You don't want to put the
# <FORM> and </FORM tags, merely the <INPUT> tags for each field.
# The values to be displayed are in %rec and should be incorporated
# into your form. You can use &build_select_field, &build_checkbox_field
# and &build_radio_field to generate the respective input boxes. Text and
# Textarea inputs can be inserted as is. If you turn on form auto
# generation, the program will build the forms for you (all though they may
# not be as nice). See the README for more info.
my (%rec) = @_;
($db_auto_generate and print &build_html_record_form(%rec) and return);
my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
print qq|
<TABLE WIDTH="450" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>ID:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="ID" SIZE="20" VALUE="$rec{'ID'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Owner:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Owner" SIZE="20" VALUE="$rec{'Owner'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Owner Email:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Owner Email" SIZE="20" VALUE="$rec{'Owner Email'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Name:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Name" SIZE="20" VALUE="$rec{'Name'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Year of Birth:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Year of Birth" SIZE="20" VALUE="$rec{'Year of Birth'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Breed:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Breed" SIZE="20" VALUE="$rec{'Breed'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Gender:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Gender" SIZE="20" VALUE="$rec{'Gender'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Color:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Color" SIZE="20" VALUE="$rec{'Color'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Markings:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Markings" SIZE="20" VALUE="$rec{'Markings'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Height:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Height" SIZE="20" VALUE="$rec{'Height'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Sire:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Sire" SIZE="20" VALUE="$rec{'Sire'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Dam:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Dam" SIZE="20" VALUE="$rec{'Dam'}" MAXLENGTH="255"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Disciplines:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<TEXTAREA NAME="Disciplines" ROWS="5" COLS="40" WRAP="VIRTUAL" MAXLENGTH="1000">$rec{'Disciplines'}</TEXTAREA></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Barn:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475">&nbsp;<INPUT TYPE="TEXT" NAME="Barn" SIZE="20" VALUE="$rec{'Barn'}" MAXLENGTH="255"></TD></TR>
</TABLE>
|;
}



and then:

Quote:

sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in
# returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash.
my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);
my $font_color = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399';
my $font = 'Font face="Verdana, Arial, Helvetica" Size=2';

$rec{'Disciplines'} =~ s/\n/<BR>/g;
print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ID:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'ID'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Owner:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Owner'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Owner Email:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Owner Email'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Name:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Name'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Year of Birth:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Year of Birth'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Breed:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Breed'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Gender:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Gender'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Color:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Color'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Markings:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Markings'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Height:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Height'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Sire:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Sire'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Dam:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Dam'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Disciplines:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Disciplines'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Barn:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Barn'}</Font></TD></TR>
|;
print qq|
</TABLE>
|;
}




Where did the error come in?

Last edited by:

VMinder: Dec 4, 2005, 5:04 PM
Quote Reply
Re: [VMinder] Getting Error - Help In reply to
I also get this Internal Error: (Note: I took out the login name that it gives for my domain)

Code:
CGI ERROR
==========================================
Error Message : Debug Information
Script Location : db.cgi
Perl Version : 5.008006
Setup File : default.cfgForm Variables
-------------------------------------------Environment Variables
-------------------------------------------
DOCUMENT_ROOT : /home/_______/public_html
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : 4images_lastvisit=1131651595; 4images_userid=1; 4images_lastvisit=1131651655; 4images_userid=1
HTTP_HOST : www.tainted-butterfly.com
HTTP_REFERER : http://www.tainted-butterfly.com/epona/database/
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING :
REMOTE_ADDR : 208.23.31.68
REMOTE_PORT : 2867
REQUEST_METHOD : GET
REQUEST_URI : /epona/database/db.cgi
SCRIPT_FILENAME : /home/_______/public_html/epona/database/db.cgi
SCRIPT_NAME : /epona/database/db.cgi
SERVER_ADDR : 204.15.10.60
SERVER_ADMIN : webmaster@tainted-butterfly.com
SERVER_NAME : www.tainted-butterfly.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.3.34 (Unix) mod_jk/1.2.8 PHP/5.0.4 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635 mod_ssl/2.8.25 OpenSSL/0.9.7a
Quote Reply
Re: [VMinder] Getting Error - Help In reply to
I fixed it thanks to this little thread:

http://www.gossamer-threads.com/...;;page=unread#unread
Quote Reply
Re: [VMinder] Getting Error - Help In reply to
I'm glad you posted that. There's been a problem with the configurator all these years and I didn't know about it. The problem is with the "skip blank fields" option. I guess when I wrote the script, I assumed that people would skip blank fields. The closing } is an artifact from that. I'll have to see if I can figure out the coding to see where to fix it. It's been a long time. :-)

Edited to add:
It was easier than I thought it would be. My apologies for not realizing the error sooner.


JPD
----------------------------------------------------
JPDeni's DBMan-ual
How to ask questions the smart way.

Last edited by:

JPDeni: Dec 5, 2005, 4:46 AM
Quote Reply
Re: [JPDeni] Getting Error - Help In reply to
No problem for posting that, I don't have much javascripting knowledge so that was mainly why I was confused till I found that little thread.