Gossamer Forum
Home : Products : DBMan : Installation :

No debug info displayed

Quote Reply
No debug info displayed
I am doing a new install of Dbman on a IIS5 win2k machine I make all the changes as per the readme changed the path to perl, one main thing I do is I rename db.cgi to db.pl as I do not want to create a a maping from cgi -> to perl (I change this in the the cfg file) I then call up my db.pl file and I get this error
DBMan encountered an internal error. Please enable debugging to view.

opps What did I do wrong ok in to the cfg file and set up debug call it again but it does not show any debug info mmm funny I then go to have a look at the the permisions all ok. I look on the support form and find a post about setting
$db_iis = 1 for the life of me I can not find that setting. So now I have ended up here needing some help :-(( waiting for some one to tell me I have done some thign silly :-( here is my cfg file

# File and URL's
# --------------------------------------------------------
# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "http://127.0.0.1/Renagade/dbman";
# URL of dbman.
$db_script_url = $db_dir_url . "/db.pl";
# 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', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 255, 1, '', ''],
URL => [2, 'alpha', 40, 255, 1, 'http://', '^http://'],
Type => [3, 'alpha', 0, 60, 1, '', ''],
Date => [4, 'date', 12, 15, 1, &get_date, ''],
Category => [5, 'alpha', 0, 255, 1, '', ''],
Description => [6, 'alpha', '40x3', 500, 0, '', ''],
Validated => [7, 'alpha', 0, 3, 1, 'Yes', 'Yes|No'],
Popular => [8, 'alpha', 0, 3, 0, '', ''],
Userid => [9, 'alpha', -2, 15, 0, '', '']
);


# 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 = 0;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 0;
# Display Benchmarking Information (1 = Yes, 0 = No).
$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 = (
Category => 'General,Configuration Management,Project Management,Process Improvement,Standards,Testing & Quality Assurance',
Type => 'Web,Newsgroup,Mailing List,FTP,Gopher'
);

# Radio fields. Field name => comma seperated list of radio buttons.
%db_radio_fields = ( Validated => 'Yes,No' );

# Checkbox fields. Field name => Checkbox value.
%db_checkbox_fields = ( Popular => 'Yes' );

# 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_generatrion 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 = (1,1,1,1,0);

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

# Permissions a new signup should get.
@auth_signup_permissions = (1,1,1,1,0);

# 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 = 9;

# 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.gossamer-threads.com/scripts/dbman/";

# ===========================================================================
# 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;


Quote Reply
Re: No debug info displayed In reply to
In the db.cgi file, replace sub html_print_headers with the following codes:

In Reply To:

sub html_print_headers {
# --------------------------------------------------------
# Print out the headers if they haven't already been printed.
#
if (!$html_headers_printed) {
print "HTTP/1.0 200 OK\n" if ($db_iis or $nph);
print "Pragma: no-cache\n" if ($db_nocache);
print "Content-type: text/html\n\n";
$html_headers_printed = 1;
}
}


then add the following variable in the default.cfg file:

In Reply To:

$db_iis = 1;


Regards,

Eliot Lee
Quote Reply
Re: No debug info displayed In reply to
there is no sub called sub html_print_headers

I had head that IIS4 likes a full HTTP header so I added the line
print "HTTP/1.0 200 OK\n";
to sub cgierr and it showed that it could not find the cfg file I added the full path to it and it then came up ok but it still displays

DBMan encountered an internal error.



CGI ERROR
==========================================
Error Message : Debug Information
Script Location : C:\WWW\ROOT\Renagade\dbman\db.pl
Perl Version : 5.006
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
ALLUSERSPROFILE : C:\Documents and Settings\All Users
COMMONPROGRAMFILES : C:\Program Files\Common Files
COMPUTERNAME : WEBDEV
COMSPEC : C:\WINNT\system32\cmd.exe
CONTENT_LENGTH : 0
GATEWAY_INTERFACE : CGI/1.1
HTTPS : off
HTTP_ACCEPT : */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-gb
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : %2FRenagade%2Fforum%2FstrSelectSize; ASPSESSIONIDQGQQGJZQ=DAGFHOCDDPNJLPLFFLGMKJKJ
HTTP_HOST : xxxxxxxxxxxxxxxxxxxxxxx
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
INSTANCE_ID : 1
LOCAL_ADDR : 127.0.0.1
NUMBER_OF_PROCESSORS: 1
OS : Windows_NT
OS2LIBPATH : C:\WINNT\system32\os2\dll;
PATH : C:\Perl\bin\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Symantec\pcAnywhere\
PATHEXT : .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
PATH_INFO : /Renagade/dbman/db.pl
PATH_TRANSLATED : C:\WWW\ROOT\Renagade\dbman\db.pl
PROCESSOR_ARCHITECTURE: x86
PROCESSOR_IDENTIFIER: x86 Family 6 Model 5 Stepping 0, GenuineIntel
PROCESSOR_LEVEL : 6
PROCESSOR_REVISION : 0500
PROGRAMFILES : C:\Program Files
REMOTE_ADDR : 127.0.0.1
REMOTE_HOST : 127.0.0.1
REQUEST_METHOD : GET
SCRIPT_NAME : /Renagade/dbman/db.pl
SERVER_NAME : xxxxxxxxxxxxxxx
SERVER_PORT : 80
SERVER_PORT_SECURE : 0
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Microsoft-IIS/5.0
SYSTEMDRIVE : C:
SYSTEMROOT : C:\WINNT
TEMP : C:\WINNT\TEMP
TMP : C:\WINNT\TEMP
USERPROFILE : C:\Documents and Settings\Default User
WINDIR : C:\WINNT


Quote Reply
Re: No debug info displayed In reply to
If you are getting that then you don't have any problems with your database. Change this:

# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 1;

to this in your *.cfg file and that message should/will disappear:

# Display Debugging Information (1 = Yes, 0 = No).
$db_debug = 0;