Gossamer Forum
Home : Products : DBMan : Installation :

Can't add anymore

Quote Reply
Can't add anymore
Well, the script was working fine and all. Then I changed some stuff in my .cfg as to allow default users. I didn't try to add anything until today when i found this error.
I can login fine but I can't use any admin features due to this error, although the options show up. In the following error, ignore form variables, because it still comes up with this error when i filled the form out right.

Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Invalid config file name: default~~default at /home/sites/site71/web/screens/db.cgi line 50.

Script Location : /home/sites/site71/web/screens/db.cgi
Perl Version : 5.00404
Setup File : default~~default.cfg
Session ID : Sameer.94251725056223~~default

Form Variables
Big :
Date : 13-Nov-1999
ID : 28
Image :
Title :
add_record : Add Record
db : default~~default
uid : Sameer.94251725056223~~default

Environment Variables
CONTENT_TYPE : application/x-www-form-urlencoded
DOCUMENT_ROOT : /home/sites/site71/web
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-comet, */*
HTTP_HOST : www.warcraft3.net
HTTP_REFERER : http://www.warcraft3.net/screens/db.cgi?db=default&uid=Sameer.94251725056223&add_form=1
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)
PATH : /sbin:/usr/sbin:/bin:/usr/bin
PATH_INFO : /screens/db.cgi
PATH_TRANSLATED : /home/sites/site71/web/screens/db.cgi
REDIRECT_SCRIPT_URI : http://www.warcraft3.net/screens/db.cgi
REDIRECT_SCRIPT_URL : /screens/db.cgi
REDIRECT_URL : /screens/db.cgi
REQUEST_URI : /screens/db.cgi
SCRIPT_FILENAME : /usr/cgiwrap/cgiwrap
SCRIPT_NAME : /screens/db.cgi
SCRIPT_URI : http://www.warcraft3.net/screens/db.cgi
SCRIPT_URL : /screens/db.cgi
SERVER_NAME : www.warcraft3.net
SERVER_SOFTWARE : Apache/1.3.3 Cobalt (Unix) (Red Hat/Linux) PHP/3.0.7

It refers to line 50, and this is the area around line 50 in the cgi file

# Make sure we are using perl 5.003, load the config file, and load the auth file.
eval {
unshift (@INC, $db_script_path);
require 5.003; # We need at least Perl 5.003
unless ($db_setup =~ /^[A-Za-z0-9]+$/) { die "Invalid config file name: $db_setup"; }
require "$db_setup.cfg"; # Database Definition File
require "auth.pl"; # Authorization Routines

here is my cfg variables related to this stuff.

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

# Permissions a new signup should get.
@auth_signup_permissions = (1,0,0,0,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 = 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 = -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.warcraft3.net";

Quote Reply
Re: Can't add anymore In reply to
not sure if I was clear, i mean now i can not add records, modify records, delete records although I can login with the account and view all items.

but what is weird is that when I login all those options are there and linking right, but when I try to do one of those i get some cgi error
Quote Reply
Re: Can't add anymore In reply to
It seems that your path information in your .cgf file is incorrect, which would be causing the cgi error.
Also try turning off default permission.
DBman dosn't like it when you try using $auth_allow_default = 1; and $auth_modify_own = 1;.
If you wish to use both, there is a mod written by JPDeni which will allow both.

hope this helps
Quote Reply
Re: Can't add anymore In reply to
I really dont think it was path info that was incorrect. I can still login and view things but not edit the database cause of some error loading libraries. But, I still went and checked my path info in the .cgf and it was fine.

I also shut of auth modify own

I think the problem is with configuration because I can view the stuff, login and all fine which would indicate its chmoded correctly.

Also like I said i could modify the database perfectly until I changed the cfg file options to allow for a default user. I just tried right now if it would work with default user off and I got the same error so I did something to it at that time or like it says something with that line 50 "invalid config file name"
Quote Reply
Re: Can't add anymore In reply to
Could I please get some help on this
Quote Reply
Re: Can't add anymore In reply to
# 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;

Shouldn't" $auth_user_field" be set to a field that contains user id so that dbman will know if you have the correct premissions to modify a file???
Quote Reply
Re: Can't add anymore In reply to
Hi Sameer2:

I think that maybe you did some modifications which corrupted the script. If you would post a URL where I can take a look at both your default.cfg and db.cgi and see what has gone wrong.

Quote Reply
Re: Can't add anymore In reply to
Sorry for taking so long to answer but i have been really busy this week

Angst, i tried just testing it to set at 1 and with a new database to see if it would work. It didnt. If it had I would have just manually edited my database to fit that format

Sun, here they are

Quote Reply
Re: Can't add anymore In reply to
Hi Sameer2:

Setup File : default~~default.cfg
Session ID : Sameer.94251725056223~~default

Note that there are additional characters that form the word default~~default.cfg. Here lies the problem. However, I cannot be sure where the source of the problem. Can you please post up additionally the html.pl files so that I can check it on my local machine?