Gossamer Forum
Home : Products : DBMan : Installation :

Internal Error

Quote Reply
Internal Error
I have read all the relevant posts on this subject and none of the suggestions are working. It doesnt matter if I have the debug on or off, I still get "DBMan encountered an internal error. Please enable debugging to view."
I used jpdeni's configurator since I was afraid of messing up the syntax of the original script. The script is located at www.mystsplace.com/cgi-bin/dbman . I dont know what else to try. I was able last year to get the older version working perfectly but with this version I am at a loss.
Here are my config files.
html.pl#
# ----------------------
# DBMan
# ----------------------
# Database Administrator
#
# File: html.pl
# Description: This file contains all the HTML that the program generates.
# Author: Alex Krohn
# Web: http://www.gossamer-threads.com/
# Version: 2.05
# CVS Revision: $Id: html.pl,v 1.3 2000/07/08 18:14:40 alex Exp $
#
# COPYRIGHT NOTICE:
#
# Copyright 1997 Gossamer Threads Inc. All Rights Reserved.
#
# This program is being distributed as shareware. It may be used and
# modified free of charge for personal, academic, government or non-profit
# use, so long as this copyright notice and the header above remain intact.
# Any commercial use should be registered. Please also send me an email,
# and let me know where you are using this script. By using this program
# you agree to indemnify Gossamer Threads Inc. from any liability.
#
# Selling the code for this program without prior written consent is
# expressly forbidden. Obtain permission before redistributing this
# program over the Internet or in any other medium. In all cases
# copyright and header must remain intact.
#
# Please check the README file for full details on registration.
# =====================================================================

##########################################################
## HTML Globals ##
##########################################################
# Put any globals you like in here for your html pages.
$html_title = 'Database Manager Demo';


##########################################################
## 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"> <INPUT TYPE="TEXT" NAME="ID" SIZE="20" VALUE="$rec{'ID'}" MAXLENGTH="4"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Member Name:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="Member Name" SIZE="20" VALUE="$rec{'Member Name'}" MAXLENGTH="50"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>CU User Name:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="CU User Name" SIZE="20" VALUE="$rec{'CU User Name'}" MAXLENGTH="30"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Email:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="Email" SIZE="20" VALUE="$rec{'Email'}" MAXLENGTH="50"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>ICQ:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="ICQ" SIZE="20" VALUE="$rec{'ICQ'}" MAXLENGTH="10"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>URL:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="URL" SIZE="20" VALUE="$rec{'URL'}" MAXLENGTH="100"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Date Joined:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="Date Joined" SIZE="20" VALUE="$rec{'Date Joined'}" MAXLENGTH="10"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Type:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="Type" SIZE="20" VALUE="$rec{'Type'}" MAXLENGTH="20"></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="150"><$font_color>Category:</FONT></TD>
<TD VALIGN="TOP" WIDTH="475"> <INPUT TYPE="TEXT" NAME="Category" SIZE="20" VALUE="$rec{'Category'}" MAXLENGTH="20"></TD></TR>
</TABLE>
|;
}

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

$url{'Email'} = $rec{'Email'};
$url{'Email'} =~ s/<\/?B>//g;
$url{'URL'} = $rec{'URL'};
$url{'URL'} =~ s/<\/?B>//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%"> <$font>$rec{'ID'}</Font></TD></TR>|;
if ($rec{'Member Name'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Member Name:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Member Name'}</Font></TD></TR>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>CU User Name:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'CU User Name'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Email:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="mailto:$url{'Email'}">$rec{'Email'}</a>|;
if ($rec{'ICQ'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>ICQ:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'ICQ'}</Font></TD></TR>
|;
}
print qq||;
if ($rec{'URL'}) {
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>URL:</FONT></TD>
<TD WIDTH="80%"> <$font><a href="$url{'URL'}">$rec{'URL'}</a>
|;
}
print qq|
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Date Joined:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Date Joined'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Type:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Type'}</Font></TD></TR>
<TR><TD ALIGN="Right" VALIGN="TOP" WIDTH="20%"><$font_color>Category:</FONT></TD>
<TD WIDTH="80%"> <$font>$rec{'Category'}</Font></TD></TR>
</TABLE>
|;
}



##########################################################
## Home Page ##
##########################################################


default.cfg
#
# ----------------------
# DBMan
# ----------------------
# Database Administrator
#
# File: default.cfg
# Description: This is the setup file that contains the database definition,
# and most of the options required to set the program up.
# Author: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.04
#
# COPYRIGHT NOTICE:
#
# Copyright 1997 Gossamer Threads Inc. All Rights Reserved.
#
# This program is being distributed as shareware. It may be used and
# modified free of charge for personal, academic, government or non-profit
# use, so long as this copyright notice and the header above remain intact.
# Any commercial use should be registered. Please also send me an email,
# and let me know where you are using this script. By using this program
# you agree to indemnify Gossamer Threads Inc. from any liability.
#
# Selling the code for this program without prior written consent is
# expressly forbidden. Obtain permission before redistributing this
# program over the Internet or in any other medium. In all cases
# copyright and header must remain intact.
#
# Please check the README file for full details on registration.
# =====================================================================
# File and URL's
# --------------------------------------------------------
# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "http://www.mystsplace.com/cgi-bin/dbman";
# URL of dbman.
$db_script_url = $db_dir_url . "/db.cgi";
# Full Path and File name of the database file.
$db_file_name = $db_script_path . "/default.db";
# Full path and file name of the counter file.
$db_id_file_name = $db_script_path . "/default.count";
# Full path and file name of the authorization directory.
$auth_dir = $db_script_path . "/auth";
# Full path and file name of the password file.
$auth_pw_file = $db_script_path . "/default.pass";
# Full path and file name of the log file.
$auth_log_file = $db_script_path . "/default.log";
# Full path and file name of the html routines.
require $db_script_path . "/html.pl";

# Database Definition
# --------------------------------------------------------
# Definition of your database. Format is
# field_name => ['position', 'field_type', 'form-length', 'maxlength', 'not_null', 'default', 'valid_expr']

%db_def = (
'ID' => [ 0, 'numer', 20, 4, 1, '', '\d{1}'],
'Member Name' => [ 1, 'alpha', 20, 50, 0, '', ''],
'CU User Name' => [ 2, 'alpha', 20, 30, 1, '', ''],
'Email' => [ 3, 'alpha', 20, 50, 1, '', '.+@.+..+'],
'ICQ' => [ 4, 'numer', 20, 10, 0, '', '\d{2}'],
'URL' => [ 5, 'alpha', 20, 100, 0, '', '^http://'],
'Date Joined' => [ 6, 'numer', 20, 10, 1, '', '\d{5}'],
'Type' => [ 7, 'alpha', 20, 20, 1, '', ''],
'Category' => [ 8, 'alpha', 20, 20, 1, '', '']
);

# The column name for the database key. Can be any column, but it must be unique!
# You can't have two records with the same key value!
$db_key = 'ID';
# Track the key? Should DBMan keep a counter of the next key to use? This isn't
# neccessary if you can guarantee that your entry in the key field will be unique
# (i.e. a userid).
$db_key_track = 1;
# Database delimeter.
$db_delim = '|';
# Use file locking (1 = Yes, 0 = No). Should be used, but won't work on Win95.
$db_use_flock = 1;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 0;
# Display Benchmarking Information (1 = Yes, 0 = No).
# use Benchmark; # Uncomment this line if benchmarking is used.
$db_benchmark = 0;
# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 1;

# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (

);

# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = (

);

# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = (

);

# Default maximum number of hits returned in a search.
$db_max_hits = 10;
# Bold search results (1 = Yes, 0 = No).
$db_bold = 1;
# Regular and title fonts used in auto_generation and html.pl.
$font = 'font face="verdana,arial,helvetica" size="2"';
$font_title = 'font face="verdana,arial,helvetica" size="4"';

# Authorization Options
# --------------------------------------------------------
# No Authentication? (1 = "there is no authentication", 0 = "there is authentication")
# If you choose no authentication, then set the permissions of what
# people can do with: @auth_default_permissions below.
$auth_no_authentication = 0;

# The amount of time in seconds that user files are kept in the
# auth directory before the program removes them. 2-6 hours is
# probably a good value.
$auth_time = 21600; # 6 hours (in seconds)

# Enable (1) or disable (0) logging.
$auth_logging = 1;

# Allow a default user? This means you can specify a user via the URL
# and skip the logon process. Use this to allow people to search without
# logging on, but require log in if they want to add/modify/remove etc.
# (1 = "yes", 0 = "no")
$auth_allow_default = 0;

# Default permissions used if there is no authentication, or for a default
# user. (View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (0,0,0,0,0);

# Allow people to sign up for their own userid/passwords? They will
# recieve default permissions.
$auth_signup = 0;

# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,1);
# Registered users: can modify/delete _only_ own records. For this to make
# sense you should set default off or to 1,0,0,0.
$auth_modify_own = 0;

# Registered users: can view _only_ own records. For this to make sense
# you should turn off default permissions.
$auth_view_own = 0;

# Auth user field. This is the field position in the database used for storing
# the userid who owns the record. Set to -1 if not used.
$auth_user_field = -1;

# URL to send user if they chose log off. Leave blank and the script will return to
# the logon prompt (although this only makes sense if you are using authentication).
$auth_logoff = "http://www.mystsplace.com/welcome.html";


# ===========================================================================
# Build up some variables from your definitions. Internal use only.
foreach (sort { $db_def{$a}[0] <=> $db_def{$b}[0] } keys %db_def) {
push (@db_cols, $_);
$db_sort{$_} = $db_def{$_}[1];
$db_form_len{$_} = $db_def{$_}[2];
$db_lengths{$_} = $db_def{$_}[3];
$db_not_null{$_} = $db_def{$_}[4];
$db_defaults{$_} = $db_def{$_}[5];
$db_valid_types{$_} = $db_def{$_}[6];
($_ eq $db_key) and $db_key_pos = $db_def{$_}[0];
}
1;
</XMP></BODY></HTML>

Can someone help please??


Quote Reply
Re: Internal Error In reply to
Well, an update. I loaded everything up with no modifications, and I can get the login screen, however now when I put the login "admin" and pw of "admin" I am taken to a "no such page" page. Does anyone have a copy of the older version of this script? I seem to have had more luck with that one!

Quote Reply
Re: Internal Error In reply to
A "page not found" error is most likely caused by incorrectly configuring the $db_dir_url variable in default.cfg

Make sure it is set to the address where DBMan is installed (minus the last /)

There's nothing really different between 2.05 and 2.04, just some security patches, which may make downgrading unwise...

- Mark


Astro-Boy!!
http://www.zip.com.au/~astroboy/
Quote Reply
Re: Internal Error In reply to
Well, I had done that before and it gave me an internal error but now it is working ok. And, I went ahead and used my old config's that I worked up from jpdeni's site with the fields that I am needing this for and uploaded the old database that I had on the old server. However, even tho the script is working fine, I get a script error at the bottom! Strange huh?
Here it is.Can anyone tell me what this means?
treasure
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DBMan encountered an internal error.

CGI ERROR
==========================================
Error Message : Debug Information
Script Location : db.cgi
Perl Version : 5.00503
Setup File : default.cfg
User ID : default

Form Variables
-------------------------------------------
CU User Name : Hiddentreasure
Category : Admin
Date : 13-Mar-2000
Email : treasure@dpenterprises.org
ICQ# : 66352301
ID : 2
Member Name : Lisa Haase
Type : Staff
URL : http://www.dpenterprises.org
db : default
modify_record : Modify Record
uid :

Environment Variables
-------------------------------------------
CONTENT_LENGTH : 230
CONTENT_TYPE : application/x-www-form-urlencoded
DOCUMENT_ROOT : /data1/virtualave.net/lhaase
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, application/x-comet, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.mystsplace.com
HTTP_REFERER : http://www.mystsplace.com/cgi-bin/dbman/db.cgi
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING :
REMOTE_ADDR : 63.86.133.92
REMOTE_PORT : 1279
REQUEST_METHOD : POST
REQUEST_URI : /cgi-bin/dbman/db.cgi
SCRIPT_FILENAME : /data1/va/mystsplace.com/cgi-bin/dbman/db.cgi
SCRIPT_NAME : /cgi-bin/dbman/db.cgi
SCRIPT_URI : http://www.mystsplace.com/cgi-bin/dbman/db.cgi
SCRIPT_URL : /cgi-bin/dbman/db.cgi
SERVER_ADMIN : webmaster@virtualave.net
SERVER_NAME : www.mystsplace.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.3.6 (Unix)



Quote Reply
Re: Internal Error In reply to
As discussed QUITE a few times in this forum, you need to TURN OFF the $db_debug variable in the default.cfg file.....

Code:

$db_debug = 0;


0 = OFF, NO
1 = ON, YES

----this is a recording----

Regards,

Eliot Lee