Gossamer Forum
Home : Products : DBMan : Installation :

DBMan Error

Quote Reply
DBMan Error
First off, you guys are a BIG HUGE HELP! I've been reading old posts and I FINALLY got the debugging to turn on because of what somebody said to force it on. Now that I know what the error is, hopefully I can fix it. The only bad thing is, I don't know what's wrong. The error is below and.. anything.. anything to fix this is appreciated. Thank you! O! And my default.cfg file is below the error.

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: syntax error at default.cfg line 60, near "Horses Name"

Script Location : /data/barrlapp/cgi-bin/db.cgi
Perl Version : 5.00503
Setup File : default.cfg

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

Environment Variables
-------------------------------------------
CONTENT_LENGTH :
DOCUMENT_ROOT : /data
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_HOST : barrlapp.vr9.com
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 98)
PATH : /usr/local/bin:/usr/bin:/bin
QUERY_STRING :
REMOTE_ADDR : 205.188.208.39
REMOTE_PORT : 26670
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/db.cgi
SCRIPT_FILENAME : /data/barrlapp/cgi-bin/db.cgi
SCRIPT_NAME : /cgi-bin/db.cgi
SCRIPT_URI : http://barrlapp.vr9.com/cgi-bin/db.cgi
SCRIPT_URL : /cgi-bin/db.cgi
SERVER_ADDR : 204.50.109.92
SERVER_ADMIN : webmaster@vr9.com
SERVER_NAME : barrlapp.vr9.com
SERVER_PORT : 80
SERVER_PROTOCOL : INCLUDED
SERVER_SOFTWARE : Apache/1.3.12 (Unix) MOD_VR9/0.1

default.cfg file...
# File and URL's
# --------------------------------------------------------
# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "/data/barrlapp/cgi-bin";
# 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', 5, 8, 1, '', ''],
Horses Name => [1, 'alpha', 40, 255, 1, '', ''],
Breed => [2, 'alpha', 40, 255, 1, '', ''],
Gender => [3, 'alpha', 0, 60, 1, '', ''],
Age => [4, 'numer', 12, 15, 1, '', ''],
Status => [5, 'alpha', 40, 255, 1, '', ''],
Owner => [6, 'alpha', '40', 500, 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 = 1;
# Auto generate the html forms (1 = Yes, 0 = No).
$db_auto_generate = 1;
# 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 = ();

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

# Default maximum number of hits returned in a search.
$db_max_hits = 30;
# 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"';

(that's not all of it but I think that's all you need...)

Quote Reply
Re: DBMan Error In reply to
Should read:

%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
'Horses Name' => [1, 'alpha', 40, 255, 1, '', ''],
Breed => [2, 'alpha', 40, 255, 1, '', ''],
Gender => [3, 'alpha', 0, 60, 1, '', ''],
Age => [4, 'numer', 12, 15, 1, '', ''],
Status => [5, 'alpha', 40, 255, 1, '', ''],
Owner => [6, 'alpha', '40', 500, 0, '', ''], <<< This final comma should also be removed. the last field definition should not have a comma

You'll need to check any other place where you are using Horses Name to include the single quote around the field name 'Horses Name'.





Quote Reply
Re: DBMan Error In reply to
Well I'm not getting that error anymore! =) YAY! Thank you! I have one more problem though...

I actually have the logon screen but it doesn't have a link where you can get a new account or the guest/guest auth/auth passwords don't work. What have I done wrong this time?

It's at barrlapp.vr9.com/cgi-bin/db.cgi

Quote Reply
Re: DBMan Error In reply to
That url gives an error about not being able to locate html.pl

Installs:http://wiredon.net/gt
FAQ:http://www.perlmad.com

Quote Reply
Re: DBMan Error In reply to
This line in your default.cfg file should be the complete URL to your dbman directory.

# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "/data/barrlapp/cgi-bin";

Something like this:

# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "http://barrlapp.vr9.com/cgi-bin";

Give that a try and see if your scripts can then find one another.


Quote Reply
Re: DBMan Error In reply to
I wish I could say it worked. Really do. But...

CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Can't locate http://barrlapp.vr9.com/cgi-bin/html.pl in @INC (@INC contains: /usr/bin/perl /usr/libdata/perl/5.00503/mach /usr/libdata/perl/5.00503 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd /usr/local/lib/perl5/site_perl/5.005 .) at default.cfg line 51.

Script Location : /data/barrlapp/cgi-bin/db.cgi
Perl Version : 5.00503
Setup File : default.cfg

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

Quote Reply
Re: DBMan Error In reply to
In Reply To:
I actually have the logon screen but it doesn't have a link where you can get a new account or the guest/guest auth/auth passwords don't work. What have I done wrong this time?
# 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,1);

It would seem there may not be a need for login or signing up for an account - default users have access to do anything with the database. To test it out and see if this is the cause of the login problems, try accessing
http://yourdomainhere/cgi-bin/db.cgi?uid=default

If it lets you in, the database is installed properly, you just need to set your authorizations properly. Normally, a default user is able to "view" the database but not authorized to do other functions.


#(View, Add, Delete, Modify, Admin), 1 = enable, 0 = disable.
@auth_default_permissions = (1,0,0,0,0);




Quote Reply
Re: DBMan Error In reply to
Make sure that the first line in your db.cgi file indicates the correct path to perl5 on your system.

On this vr9.com address, the correct path to perl should be this:

#!/usr/bin/perl


Your error logs are indicating a premature end of script headers meaning - the files are not able to locate perl or the files have been uploaded in the wrong data type (binary as opposed to ascii format) - I'd suspect it is the shebang listed above causing the problem.



Quote Reply
Re: DBMan Error In reply to
I reuploaded everything in ASCII, checked permissions, checked the first line of db.cgi (it's right) and I still get the wrong thing! I must be missing something minute or...something. Geez.

Quote Reply
Re: DBMan Error In reply to
Can you save your html.pl file as a text file and make it available via the web? Save it as html.txt and post the URL where the file can be viewed.

Your error logs are still indicating a problem with that script.
[Tue Jul 3 15:27:41 2001] [error] Premature end of script headers: /data/barrlapp/cgi-bin/html.pl
[Tue Jul 3 15:27:41 2001] [error] MOD_VR9: Error 500 occured while processing : /data/barrlapp/cgi-bin/html.pl


Quote Reply
Re: DBMan Error In reply to
ok that's up. barrlapp.vr9.com/html.txt

Quote Reply
Re: DBMan Error In reply to
Okay, not sure what the problem is ... your text file isn't displaying as text - the browser is trying to interpret the data Smile

Seen this before, don't recall the fix but I'll do some searching while waiting for someoe else to come along with an answer.

Did spot a couple more problems though ... in default.cfg you need to change your Owner field.

Owner => [6, 'alpha', '40', 500, 0, '', '']

Should be:
Owner => [6, 'alpha', 20, 40, 0, '', '']


And in html.pl you need to change this:

<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Owner:</FONT></TD>
<TD VALIGN="TOP"> <TEXTAREA NAME="Description" ROWS="4" COLS="40" WRAP="VIRTUAL" MAXLENGTH="255">$rec{'Owner'}</TEXTAREA></TD></TR>

TO:
<TR><TD ALIGN="Right" VALIGN="TOP"><$font>Owner:</FONT></TD>
<TD VALIGN="TOP"> <INPUT TYPE="text" NAME="Owner" SIZE="20" MAXLENGTH="40"></TD></TR>




Quote Reply
Re: DBMan Error In reply to
Mine did the same thing, trying to read the HTML.

O good, so there is hope. LOL
Thank you Karen, you've been such a big help. =)

Jessica