Gossamer Forum
Home : Products : DBMan : Installation :

nasty cgi error

Quote Reply
nasty cgi error
Hello,

I am getting the following CGI error from a default dbman install. The only settiings i have changed are the the authorisation settings. These are(auth);

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

# 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,0,0,0,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,1,1,1.
$auth_modify_own = 1;

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

the CGI error is;

DBMan encountered an internal error.



CGI ERROR
==========================================
Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Can't locate sgtsl.cfg in @INC (@INC contains: /var/www/cgi-bin/dbman /usr/freeware/lib/perl5/5.00503/irix-n32 /usr/freeware/lib/perl5/5.00503 /usr/freeware/lib/perl5/site_perl/5.005/irix-n32 /usr/freeware/lib/perl5/site_perl/5.005 /usr/freeware/lib/perl5/sgi_perl/irix-n32 /usr/freeware/lib/perl5/site_perl .) at /var/www/cgi-bin/dbman/db.cgi line 52.

Script Location : /var/www/cgi-bin/dbman/db.cgi
Perl Version : 5.00503
Setup File : sgtsl.cfg
Session ID : default

Form Variables
-------------------------------------------
db : sgtsl
uid : default


PATH : /usr/sbin:/usr/bsd:/sbin:/usr/bin:/etc:/usr/etc:/usr/bin/X11:/usr/freeware/bin
QUERY_STRING : db=sgtsl&uid=default


SCRIPT_NAME : /cgi-bin/dbman/db.cgi
----end of error message----

I have removed certain data to avoid any security issues.

line 52 of db.cgi reads: require "$db_setup.cfg"; # Database Definition File

Anybody got any ideas??

Regards,
darrenb

Quote Reply
Re: nasty cgi error In reply to
Maybe... look at the post "Error loading required libraries" in this forum on Aug 29th. This may be the same thing you've experienced...

Quote Reply
Re: nasty cgi error In reply to
I had already looked at this error dated the 29th but it is not the same. The URI requst for my mine was for specific authentication, dbman actually works fine if i just call http://server/dbman/db.cgi.Unfortunately i do not get a login prompt and it was this that i was attemting to reslove. I used the the data from the post "How do I get a login page?" 2 sept 01 posted by YoYoYoYo to which LoisC responded with a fix, one that doesn't work for me..... any ideas??
regards,
darrenb

Quote Reply
Re: nasty cgi error In reply to
Was it working properly before you changed the authentication settings?


Quote Reply
Re: nasty cgi error In reply to
It still works fine now, only i cannot get a login prompt, the above error happens when i call"db.cgi?db=sgtsl&uid=default". If i call db.cgi on it's own, i instantly recieve the menu page page with no prompt. Horrible.
Any ideas??
Regards,
darrenb

Quote Reply
Re: nasty cgi error In reply to
Stupid question... but have you gone past the menu page when just using db.cgi? Done any searches, etc? Just wondering if that would cause any error messages... reason: sometimes "part" of the script will work just fine and then suddenly stop when you call a certain routine (like authentication).

I really believe your problem will relate to the fact that you've changed the name of your db & cfg files and haven't changed all references to it.

Based on the error message you get, I'm betting that somewhere the script is still looking for default.cfg.

Then again, I'm usually wrong on most things Blush.

Post the URL of your DB and maybe some of the more experienced users could take a look at it. Otherwise, post your cfg & cgi & pl files as text files somewhere on your site (not into the forum - Alex will secretly hate you) and then post the path to them.

Quote Reply
Re: nasty cgi error In reply to
I think I just noticed what you're doing wrong... your using "db=sgtsl&uid=default"

Do you have a "sgtsl.db" or do you have "default.db" ?

The example Lois gave YoYoYo won't work on your system unless you've changed the name of your file(s) from "default" to "sgtsl"

Try using "db=default&uid=default"...

Notice your files names are default.cfg & default.db, etc. unless you've changed them. If so, then see my above post.

Good luck and I hope this helps.


Quote Reply
Re: nasty cgi error In reply to
Watts,
You were right, i was submitting the wrong login details as my file names have not been changed (they are all still default), the problem is, i am still NOT getting a login prompt. I either have full access or the bare minimum. Any other ideas??
thanks,
darrenb
Quote Reply
Re: nasty cgi error In reply to
If you call up the script using:

db.cgi?db=default

it should default to the login page if your authorization settings require login

when you use:

db.cgi?db=default&uid=default

it will just enter the database. Do you have a login option in the navigation menu?


Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/
Quote Reply
Re: nasty cgi error In reply to
LoisC,
It doesn't seem to matter which login i use, they all just go straight to the menu page with all the links visible. I have authorisation required in my default config but i still don't get a prompt.

In the menu, i don't have a login link but i do have a logoff link that never changes. If i click on it (logoff) it returns/refreshes the menu page but remains as 'logoff'.
Any ideas before i start tying the noose.... ?
regards,
darrenb
Quote Reply
Re: nasty cgi error In reply to
let's see

You want defualt users to view the database but you also want to get to a login page?

the link didn't work that was given above????


would you explain a little more? who needs to login and such


openoffice + gimp + sketch ... Smile
Quote Reply
Re: [QooQ] nasty cgi error In reply to
I would like everyone to log in regardless, but i would like to pre-set functionality by user, so i can arrange who can add,delete etc.

As it stands, whatever configuration i set in default.cfg, i don't get a login page.

I am currently changing parts of the deault.cfg and the html.pl to brand the product and the results so far are great, i'ts just the login that appears
to be problematic.

your help is appreciated,
regards,
darrenb
Unsure
Quote Reply
Re: [darrenb] nasty cgi error In reply to
try these settings:

Code:
$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;

You may want to check out JPDeni's excellent DBMan tutorial.
http://jpdeni.com/dbman

Shes got information on how to set your site permissions.


good luck

openoffice + gimp + sketch ... Smile

Last edited by:

QooQ: Sep 12, 2001, 5:55 AM
Quote Reply
Re: [QooQ] nasty cgi error In reply to
I tried the settings and they made no difference, but i have had success from another route. The web server requires authentication to logon, so i setup a non authenticated port.... lo and behold the login panel appears. If i turn debugging on, i see that the perl call is abled to distinguish between a server that requires authorisation or otherwise, but how does db man distinguish between a server login and the dbman login?

I am still having problems with certain parts of the script, but i shall post them seperate in case someone gets a unique problem later that a search in the forum can return.

An answer to the above server question would be a marvel!

thanks and double thanks for the help,
regards,
darrenb