Gossamer Forum
Home : Products : DBMan : Installation :

Windows 2000 install

Quote Reply
Windows 2000 install
I spent 2 days trying to get DBMan running on Windows 2000 using the Personal Web server. Tried everything - kept getting the dreaded 500 server error. Gave up. Instead, I tried it on my website (which runs Unix and encourages CGI). Works like a charm- perfectly! I would like to have a prototype worked out on my machine before I upload it, however. Has anybody had (and solved) a similar problem? Does anyone have DBMan running on their local machine in Windows 2000?
Second question: I would like to build a database of chemical names, like H2O, but is there any way I can make the "2" a subscript, as in h<sub>2</sub>O, but without using the html sub formatting characters? This adds 10 keystrokes just to format 1 character. Thanks in advance. - Gary


Quote Reply
Re: Windows 2000 install In reply to
I don't know anything about either Windows 2000 or Personal Web Server. I use Xitami as server software on my Win98 machine and it works great. (I have PWS, but I could never get it to work.)

Regarding your subscripts, you could do something like this --

Use brackets around the subscript -- H[2]O -- when you enter the data.

Then, in sub html_record, right at the beginning, add

Code:

foreach $col (@db_cols) {
$rec{$col} =~ s/[/<sub>/g;
$rec{$col} =~ s/]/<\/sub>/g;
}
If you're likely to use square brackets for something else, try using curly brackets -- {2}.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Windows 2000 install In reply to
Thanks for that brackets routine. Tell me if I'm wrong: I will need 2 similar chemical fields: one with the brackets for displaying, and one without the brackets for searching (this would be an invisible field). Users would type in part of the chemical name, like H2SO4, or H2O, and they would see the chemical listed correctly, with subscripts (or superscripts, for that matter). Does that sound like it would work?

Quote Reply
Re: Windows 2000 install In reply to
Yes, that sounds like it would work. I don't know any other way around it.

Unless -- Do you have a separate field that has the chemical formula and nothing else? Would the only numbers in that field be subscripts? I'm thinking that you might be able to have it add the subscript code before and after any digits. I'd have to work on how to set up the regular expression, but it probably could be done.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Windows 2000 install In reply to
Digits in a chemical formula can appear either in subscripts, superscripts, or normally. Otherwise it would be a simple matter to convert all digits to subscripts. So I'll use [] for subscripts and {} for superscripts. Your routine will help - I'm a programmer, but not a Perl programmer (yet), but I'll get there. Thanks again.

Quote Reply
Re: Windows 2000 install In reply to
Just inserted your code in sub html_record at the beginning, but now I get the following error (even though I have enabled debugging): DBMan encountered an internal error. Please enable debugging to view. Any clues?

Quote Reply
Re: Windows 2000 install In reply to
Can you copy the beginning of sub html_record so I can see exactly where you put it?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Windows 2000 install In reply to
Here it is:

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.
#
# added by suggestion of JPDeni
foreach $col (@db_cols) {
$rec{$col} =~ s/[/<sub>/g;
$rec{$col} =~ s/]/<\/sub>/g;
}

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';

print qq|
<TABLE WIDTH="475" CELLPADDING=0 CELLSPACING=0 BORDER=1 BGCOLOR="#FFFFCC">
etc.

Quote Reply
Re: Windows 2000 install In reply to
I hadn't realized I needed to "escape" the brackets.

Code:

my (%rec) = @_; # Load any defaults to put in the VALUE field.
($db_auto_generate and print &build_html_record(%rec) and return);

foreach $col (@db_cols) {
$rec{$col} =~ s/\[/<sub>/g;
$rec{$col} =~ s/\]/<\/sub>/g;
}
JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Windows 2000 install In reply to
When I moved that snippet of code it worked fine. Thanks again.

Quote Reply
Re: Windows 2000 install In reply to
Hey Gary,

I run win2k advanced server and was also getting the internal server error. I solved it by changing the double quotes to single quotes in db.cgi

$db_script_path = 'full\path\dbman';

For some reason windows doesn't like double quotes in some scripts and requires the full physical path. It should work the same in win pws.

Good luck :)

Taln