I almost have this installation just right but now when I add new entries instead of adding a numerical value as my database key it's adding my userid?? Then it changes the count to the user id (which is alpha). Any ideas? If I add a regular expression in the db def to check for numbers and rest the default.count to a number it loads the number as the value for the form field and then gives me an invalid item error when trying to add it -- and adds the user id in the form field that had just had a number in it. The default user id is getting passed as a hidden variable.
Aug 30, 2001, 1:00 PM
Novice (6 posts)
Aug 30, 2001, 1:00 PM
Post #2 of 4
Views: 3243
Here's a sample of what I mean
DBMan encountered an internal error.
CGI ERROR
==========================================
Error Message : Debug Information
Script Location : /usr/vwebs/tpsupply/cgi-local/dbman/db.cgi
Perl Version : 5.00562
Setup File : default.cfg
User ID : testme
Session ID : testme.99920078447370
Form Variables
-------------------------------------------
Category : Miscellaneous
Count : 3
Description : 20 Bushel Dandux Trucks
Graphic :
ID : testme
Item : Dandux
Price : 50.00 each
add_record : Add Record
db : default
uid : testme.99920078447370
You see hwo the user ID and the ID of the item are the same even though I am passing the ID as a hidden field as a number that gets incremented each time?
the site is tpsupply.com/cgi-local/dbman/db.cgi
user is testme
password is testme
I reverted back to my db.cgi from the zip and I am still getting it. ANY IDEAS AT ALL??
DBMan encountered an internal error.
CGI ERROR
==========================================
Error Message : Debug Information
Script Location : /usr/vwebs/tpsupply/cgi-local/dbman/db.cgi
Perl Version : 5.00562
Setup File : default.cfg
User ID : testme
Session ID : testme.99920078447370
Form Variables
-------------------------------------------
Category : Miscellaneous
Count : 3
Description : 20 Bushel Dandux Trucks
Graphic :
ID : testme
Item : Dandux
Price : 50.00 each
add_record : Add Record
db : default
uid : testme.99920078447370
You see hwo the user ID and the ID of the item are the same even though I am passing the ID as a hidden field as a number that gets incremented each time?
the site is tpsupply.com/cgi-local/dbman/db.cgi
user is testme
password is testme
I reverted back to my db.cgi from the zip and I am still getting it. ANY IDEAS AT ALL??
Aug 30, 2001, 4:25 PM
Veteran (1819 posts)
Aug 30, 2001, 4:25 PM
Post #3 of 4
Views: 3236
ummm wonder if default.cfg is the problem,
here's my shortened version:
# 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, '', ''],
Date => [1, 'date', 12, 15, 1, &get_date, ''],
Maker => [2, 'alpha', 0, 255, 0, '', ''],
Description => [14, 'alpha', '60x4', 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';
if this doesn't help then post your default.cfg (same are -- not the whole thing for now.)
good luck
**************************************
on the pages in between ...
here's my shortened version:
# 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, '', ''],
Date => [1, 'date', 12, 15, 1, &get_date, ''],
Maker => [2, 'alpha', 0, 255, 0, '', ''],
Description => [14, 'alpha', '60x4', 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';
if this doesn't help then post your default.cfg (same are -- not the whole thing for now.)
good luck
**************************************
on the pages in between ...
Aug 30, 2001, 6:07 PM
Novice (6 posts)
Aug 30, 2001, 6:07 PM
Post #4 of 4
Views: 3224
Thanks for replying! I had a wrong setting in the default.cfg after all -->
# 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;
I had it set to the same field as the ID field that kept screwing me up!
# 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;
I had it set to the same field as the ID field that kept screwing me up!