Gossamer Forum
Home : Products : DBMan : Installation :

Log on?

Quote Reply
Log on?
Hello,

This is probably a "RTFM kind of question", but even after looking at both the read-me and the tutorial I still have no idea how to solve this problem: My database is not asking for a username/password. I have tried the various options in the cfg file, but could not fix this problem. What changes do I have to make in order to get promted for a login and a password? /db.cgi only offers a "Logout" option, regardless of my settings. (If I set the default user to 1,1,1,1,1 I do get all options, BUT an option to login.) Ideally, the database has only one admin, and users can always only view but not add/delete/modify anything, thus they do not need to login. But the admin should be able to.

Thanks in advance!


Quote Reply
Re: Log on? In reply to
Two questions:

What server software are you using?

What is the setting for $auth_no_authentication in your .cfg file?

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: Log on? In reply to
Deni,

I don't know which software the server is running on *hangs head*. How would I find out? (other than writing to support) The provider's name is Prohosting.

$auth_no_authentication is set to 0. Below the authorization options in the cfg file.

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

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


Quote Reply
Re: Log on? In reply to
Deni,

I figured out what the problem was/is: If the site (root) is protected with .htaccess, and if you have passed the site authentication (completely unrelated to the database script), DBMAN does not prompt for the database login. I'd say this is a bug. :-) Maybe a piece of information worth mentioning in your wonderful tutorial? I didn't think this would be the problem, but I reached a point where I was quite desperate ... and once I removed .htaccess protection for the entire site, DBMAN worked as designed.

Phew!
Quote Reply
Re: Log on? In reply to
Actually, it's a feature. Smile It was added when people wanted their users to be able to login with .htaccess and not have to log in a second time to the database.

You can put the .htaccess back in and do one of two things -- either remove the code for server authentication (I'll tell you what to remove if this is what you want) or use the DBMan .pass file as your password file for .htaccess. It will work just fine.


JPD
http://www.jpdeni.com/dbman/