Gossamer Forum
Home : Products : DBMan : Installation :

JPDeni Configurator and the html.pl setup

Quote Reply
JPDeni Configurator and the html.pl setup
Folks,
I wanted to let you know that I've run into an issue using JPDeni's Configurator and what I did to correct it.

Essentially what I had done is first get the demo up and running. From there I ran the Configurator and collected the default.cfg and html.pl modification. I uploaded the new default.cfg and revised html.pl, saving the original files like a good little gremlin. The resulting message was not what I expected when I accessed the db.cgi: "DBMan encountered an internal error. Please enable debugging to view."

Well, ok, I can follow instructions so I turned debug mode on, reploaded default.cfg and - nothing. No change at all. Still the same message.

Being a methodical type, I pulled the new default.cfg off the server, uploaded the demo one that I had working before all this and again no change. So I swapped the files. I uploaded the working version of the html.pl and the new version of the default.cfg. That worked. I could now access the database. It looked nasty due to the discrepency of the database fields and the demo database still uploaded in default.db but at least I wasn't getting an error on the login screen.

Next step was to figure out where, exactly, the error was arising from in the modified html.pl. Since I had replaced two sections in the file, sub html_record_form and sub html_record, I had a 50/50 chance of getting the right section. I was being hopeful at this point that it wasn't an issue with both sections. I decided to replace the modified sub html_record with the original sub html_record from the demo html.pl I had working. I uploaded the file and again didn't have an error contend with. Ok, I had located the section with the error - sub html_record. I removed 14 of the 16 fields I had created leaving a section of code like this:

Code:

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{'Description'} =~ 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>Player:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Player'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Name:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Name'}</Font></TD></TR>
|;
}

This worked as well. That's when I noticed that every field defined after this was enclosed in a print qq| and |; and had a } between the |; and print qq| for the next field as follows:

Code:

}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Nationality:</FONT></TD>
<TD WIDTH="80%">&nbsp;<$font>$rec{'Nationality'}</Font></TD></TR>
|;
}
print qq|

I recall from my javascripting days that an end } closes the script and stops it running. Since I didn't see any corresponding { to match the } I decided to remove each } between the |; and print qq|. I then saved and uploaded the file and voila! it worked like a charm.

I wanted to mention this since I couldn't find anything in the forum that matched this issue and figured that if it was new developement in JPDeni's Configurator it might help out the next person to come along.

Finally, my thanks to everyone who has posted in this forum. It's proved to be a wealth of information.

JPDeni deserves special thanks in that I was struggling to get the fields defined properly until I found and tried the Configurator.


Ask and thou shalt receive. Specify and we'll get it right.
Quote Reply
Re: [ProfGremlin] JPDeni Configurator and the html.pl setup In reply to
Thank you for posting this!!

I was beating my brain in for the past week trying to figure out why the DB would stop working after I used the Configurator.

Thank you again!

& Thank you JPDeni for making that configurator! Without it I would still be sitting here fighting on how to create fields!