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.
CGI ERROR
==========================================
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_LENGTH : 132
CONTENT_TYPE : application/x-www-form-urlencoded
DOCUMENT_ROOT : /home/sites/site71/web
GATEWAY_INTERFACE : CGI/1.1
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_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
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
QUERY_STRING :
REDIRECT_SCRIPT_URI : http://www.warcraft3.net/screens/db.cgi
REDIRECT_SCRIPT_URL : /screens/db.cgi
REDIRECT_STATUS : 200
REDIRECT_UNIQUE_ID : OC2sC9HVYC4AAGaVZiY
REDIRECT_URL : /screens/db.cgi
REMOTE_ADDR : 24.218.225.236
REMOTE_PORT : 4998
REQUEST_METHOD : POST
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_ADMIN : admin
SERVER_NAME : www.warcraft3.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.3 Cobalt (Unix) (Red Hat/Linux) PHP/3.0.7
UNIQUE_ID : OC2sC9HVYC4AAGaVZiY
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
};
Also
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";
Thanks
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.
CGI ERROR
==========================================
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_LENGTH : 132
CONTENT_TYPE : application/x-www-form-urlencoded
DOCUMENT_ROOT : /home/sites/site71/web
GATEWAY_INTERFACE : CGI/1.1
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_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_CONNECTION : Keep-Alive
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
QUERY_STRING :
REDIRECT_SCRIPT_URI : http://www.warcraft3.net/screens/db.cgi
REDIRECT_SCRIPT_URL : /screens/db.cgi
REDIRECT_STATUS : 200
REDIRECT_UNIQUE_ID : OC2sC9HVYC4AAGaVZiY
REDIRECT_URL : /screens/db.cgi
REMOTE_ADDR : 24.218.225.236
REMOTE_PORT : 4998
REQUEST_METHOD : POST
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_ADMIN : admin
SERVER_NAME : www.warcraft3.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.3 Cobalt (Unix) (Red Hat/Linux) PHP/3.0.7
UNIQUE_ID : OC2sC9HVYC4AAGaVZiY
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
};
Also
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";
Thanks