Gossamer Forum
Home : Products : DBMan : Installation :

Can't get a login screen, goes straight to main menu

(Page 1 of 2)
> >
Quote Reply
Can't get a login screen, goes straight to main menu
Hi gang,
I've been struggling with the seemingly only problem I'm having with DBman, and that is: Regardless of how I setup the default.cfg file, I can't get a "login" screen...it takes me straight to the "main menu".
If I set $auth_no_authentication = 0; to force authentication, regardless of the user definitions in default.pass, it takes me to the main menu with 2 options..."main" and "log off".
if I set $auth_no_authentication = 1; to tell it to not authenticate, it also goes straight to the main menu, and will provide the rights as dictated by @auth_default_permissions = (1,1,1,1,0);.
I went to JPDenni's DBman-ual (which btw is a fantastic site, thanks for the resource!), and even started with a fresh demo install, and followed it to the letter for installing it, with exactly the same results above. All the other cgi seems to work, and I can do a "view" when I'm in as a default user with no authentication, and search, return results, etc, so the perl is working, and all seems to be in the right place. Even adding admin rights to the default user and performing admin functions such as adding a user/password work flawlessly, however, I can never get a "login" screen. I've even gone so far as to clear all my "offline content", browsing from other machines, etc..to no avail (grasping at straws basically). I've exhausted all my options, and am hoping one of you kind people can get me on my way...this one small hurdle, and everything else is working and I can get my huge recipe database online to share with all. Smile
Thanks for any help you can provide, and I'd be happy to send along a cfg file, etc if that'd help.
Take care,
GraffiX

Addendum: I saw someone else was having this same problem as I went through more support msgs here. I'm posting the items that were requested (by a gent named Eliot Lee) for this very same issue...if someone would take a peek, I'd be grateful. Smile

Demo is installed at:
http://www.graffix.tzo.com/cgi-bin/dbman/db.cgi

you can look at the actual files here:

http://www.graffix.tzo.com/files/html.pl
http://www.graffix.tzo.com/files/db.cgi
http://www.graffix.tzo.com/files/default.cfg

Thanks again for any help you can provide!


[This message has been edited by graffix (edited January 08, 2000).]
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
You may need to post your auth.pl file also. For some reason $status is returning "ok" when checking for a password.

------------------
WFMY-TV Webmaster
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Thanks for taking a look! I've put the auth.pl file in the same location as the other files for public viewing. I really do appreciate your assistance, and again, thanks for givin' this a shot...it's been driving me absolutely mad! Smile
Takc care,
GraffiX

http://www.graffix.tzo.com/files/auth.pl



[This message has been edited by graffix (edited January 08, 2000).]

[This message has been edited by graffix (edited January 08, 2000).]
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
The auth.pl file looks good. I take it that you haven't modified anything.

Are you sure that you set the permissions correctly? Particularly on the auth directory?

------------------
WFMY-TV Webmaster
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Thanks for checking...yeah, I've left this VERY "out of the box" for now so as not to introduce any other variables, though I have the same issue with my modified recipe database one as well.

This is running on an NT box using Xitami webserver, but the permissions are such that it should have no problem writing to the auth dir. Is there any debug logging that I can do to check further from this end to see if it is indeed a rights issue? I really don't think it is, but given this almost stock install of DBman, and the nature of the issue, I'm not seeing what else it could be. Any ideas? Thanks again for all your assistance!
GraffiX
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Uh...Change the $db_debug variable to 1 in the default.cfg file and you will see the other problems you are experiencing with your database.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Is the new server the same operating system and web server software as the old one??

Yes, please upload your files as TEXT files, and provide URLs to these files, so we can see what you are doing wrong.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
I am having this exact problem as well. For some bizarre reason, going to http://hj.stratics.com/cgi-bin/dbman/db.cgi takes me to the main menu instead of to the logon screen. It even does this if I go to http://hj.stratics.com/cgi-bin/dbman/db.cgi?html_login_form.

I have just recently brought this code over to a new server. Everything worked fine on the old server but now there's no way to get the logon screen. I can get around this by setting default permissions to allow everyone to modify the database, but I really don't want to do that...only people with the correct authorization should be able to modify the database.

If you want me to upload my files as well let me know and I'll do so. This seems to be a general problem though. I'm just at a loss since everything worked fine on my old server. Thanks very much for any help you can provide!

--Jim Day

Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Unfortunately, I don't think it's "something we're doing wrong". After posting my files, nobody seemed to be able to note anything wrong, though it doesn't work. I kept the base install very basic for the purpose of keeping it easy to look at, and introducing absolutely no outside variables to the issue. I even followed the online tutorial mentioned above to the letter, with the same results.
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Uh...You posted the actual files NOT the text files and the URLs to the TEXT files.

Please save the following files:

default.cfg
db.cgi

AS TEXT FILES!

And since you have not gotten the scripts to work, most likely IT IS attributed to human error.

Wink

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Well, I've renamed the files to .txt files. The locations are as follows:

http://www.graffix.tzo.com/files/html.txt
http://www.graffix.tzo.com/files/db.txt
http://www.graffix.tzo.com/files/default.txt
http://www.graffix.tzo.com/files/auth.txt

If you can find the error in the setting up of this database I'd be eternally grateful.

Demo is installed at:
http://www.graffix.tzo.com/cgi-bin/dbman/db.cgi

which exhibits the symptom of going straight to the main menu, bypassing the login screen entirely.

Frankly, I'd be glad to know it IS an error on my part, as I've beat my head into the wall trying every single possible combination of authentication, as well as following the suggested tutorial to the letter, only to get the same results.

Thanks for your assistance!
GraffiX
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Try changing the following codes in your default.cfg file:

Code:
$auth_allow_default = 0;

TO THE FOLLOWING:

Code:
$auth_allow_default = 1;

And change the following codes:

Code:
@auth_default_permissions = (1,1,1,1,0);

TO THE FOLLOWING:

Code:
@auth_default_permissions = (1,0,0,0,0);

Change the FOLLOWING:

Code:
$auth_modify_own = 0;

TO THE FOLLOWING:

Code:
$auth_modify_own = 1,0,0,0;

Change the following:

Code:
$auth_view_own = 0;

TO THE FOLLOWING:

Code:
$auth_view_own = 1;

BTW: These are the authentication permissions that work for me in my various DBMAN projects:

Code:
##############################################################################
# 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 = (0,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 = 1,0,0,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 = 0;

# This is the field position in the database used for storing
# the email address of the one who owns the record. Set to -1 if not used.
$auth_email_field = 14;

# 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.anthrotech.com/cgibin/career/res/";

Also, I would recommend using the original auth.pl script.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Like Graffix, I really hope this is some simple error on my part...having the ability to protect the database with passwords is essential to my site.

Here we go. The following is the information on my original server where dbman works flawlessly:


CGI ERROR
==========================================
Error Message : Debug Information
Script Location : db.cgi
Perl Version : 5.00404
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
CONTENT_LENGTH : 0
DOCUMENT_ROOT : /usr/local/zeus/web_roots/frontpage/www.herojourney.net
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/msword, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_HOST : www.herojourney.net
HTTP_TE : identity;q=1.0, chunked;q=0.0
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; MSN 2.6; Windows 98)
HTTP_VIA : HTTP/1.1 alntn1.tx.home.com[18043024] (Traffic-Server/1.1.7 [uSc s f p eN:tUcS i p s ])
PATH : /usr/bin:/usr/ucb/bin:/usr/local/bin
QUERY_STRING :
REMOTE_ADDR : 24.4.254.195
REMOTE_HOST : 24.4.254.195
REMOTE_USER :
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/dbman/db.cgi
SCRIPT_FILENAME : /usr/local/zeus/web_roots/frontpage/www.herojourney.net/cgi-bin/dbman/db.cgi
SCRIPT_NAME : /cgi-bin/dbman/db.cgi
SERVER_ADMIN : webmaster@myhost
SERVER_NAME : www.herojourney.net
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Zeus/3.1
TZ : US/Eastern
VSERVER_NAME : frontpage


And here is the information on my new server where dbman cannot go to the login screen:


CGI ERROR
==========================================
Error Message : Debug Information
Script Location : /www/hj/cgi-bin/dbman/db.cgi
Perl Version : 5.00503
Setup File : default.cfg

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
DOCUMENT_ROOT : /www/hj
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-us
HTTP_HOST : hj.stratics.com
HTTP_PRAGMA : no-cache
HTTP_TE : identity;q=1.0, chunked;q=0.0
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; MSN 2.6; Windows 98)
HTTP_VIA : HTTP/1.1 alntn1.tx.home.com[18043024] (Traffic-Server/1.1.7 [uNc s f p eN:tUcS i p s ])
PATH : /sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
QUERY_STRING :
REMOTE_ADDR : 24.4.254.195
REMOTE_HOST : proxy2-external.alntn1.tx.home.com
REMOTE_PORT : 12340
REMOTE_USER : hj
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/dbman/db.cgi
SCRIPT_FILENAME : /www/hj/cgi-bin/dbman/db.cgi
SCRIPT_NAME : /cgi-bin/dbman/db.cgi
SERVER_ADDR : 205.229.76.17
SERVER_ADMIN : den@statics.com
SERVER_NAME : hj.stratics.com
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.0
SERVER_SIGNATURE :
SERVER_SOFTWARE : Apache/1.3.9 (Unix) (Red Hat/Linux)

Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Do you have the authentication configurations I posted?????????????

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Eliot, I made all of your suggested changes and am having the same problem. After replicating your setup exactly I went back to my original setup. Here are the files:

http://hj.stratics.com/dbmantest/authpl.txt
http://hj.stratics.com/dbmantest/dbcgi.txt
http://hj.stratics.com/dbmantest/defaultcfg.txt
http://hj.stratics.com/dbmantest/htmlpl.txt

Please tell me I just overlooked something simple. I've spend several hours just trying to fix this problem and am at a dead end. Any help you can offer would be much appreciated!
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
"Do you have the authentication configurations I posted?????????????"

Not sure if you're asking me or graffix, but I duplicated all of the suggested authentications from your earlier message in this thread if that's what you're asking.
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
I made the changes to the default.cfg file you suggested above, with the same results. I'm curious about your suggestion to use the original auth.pl file though...the one I have is straight out of the archive, and is the very same one in the auth.txt file I posted for viewing. Did it not look like the original? In looking at the file, I see the script ending with:

----snippet----
}
}

1;
-----end snippet-----

I'm not perl guru by ANY stretch...but is that how the script should end? with a "1;", or is there something missing perhaps? I've redownloaded the archive, and it contained the same auth.pl file.

Anyway, if you have any other ideas, I'd sure be open to suggestions and would truly appreciate any additional help, as I'm absolutely out of ideas at this point.

Thanks again, and please let me know if there's anything else I can provide to assist in resolving this problem in terms of trying new options, modding code, posting files/results, etc
GraffiX

Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
This seems to be a problem not related to the scripts, but your servers, guys and/or gals.

I have provided all the advice I can. If you have reloaded the original DBMAN files, set the permissions correctly, then the script should work.

Contact your hosting company or server administrator for assistance.

OR...better yet, contact one of the DBMAN Installers in the Resource Center to assist you with setting up your DBMAN!

Best of luck!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------






[This message has been edited by Eliot (edited January 15, 2000).]
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Jim,

I guess what I forget to mention is PUT THE FILES IN A PUBLICLY ACCESSIBLE DIRECTOY ON YOUR SERVER!

How can I see your files in a password protected directory!?!?!?!

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Eliot,

Have you been able to look at my scripts? I would appreciate you doing that real quick if you don't mind just in case there is something I've missed. Thanks.
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Sorry, here they are on another server:

http://www.herojourney.net/dbmanfiles/authpl.txt

http://www.herojourney.net/dbmanfiles/dbcgi.txt

http://www.herojourney.net/dbmanfiles/defaultcfg.txt

http://www.herojourney.net/dbmanfiles/htmlpl.txt



Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Thank you.

Welp, I do not see anything pecular with your files.

What I would suggest is the following:

1) Add the absolute path in your $db_script_path in your db.cgi file.

2) Enable the logging, by setting the logging variable to 1 rather than 0 in your default.cfg file.

That is all I have to suggest. If these changes do nothing for you...contact your server administrator for further assistance.

Good luck.

Regards,

------------------
Eliot Lee
Anthro TECH,L.L.C
www.anthrotech.com
----------------------




Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
I'll try that Eliot, thanks for checking.

Out of curiousity Graffix, is your server password-protected like my new server? I wonder if that could have anything to do with the inability to use authorizations.
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
I am a total novice here - please don't SCREAM at me if I am way off base on this.
Code:
# URL of the directory dbman resides in. No Trailing Slash Please.
$db_dir_url = "http://hj.stratics.com/cgi-bin/dbman";# URL of dbman.
$db_script_url = $db_dir_url . "/db.cgi";
# Full Path and File name of the database file.
$db_file_name = $db_script_path . "/default.db";
# Full path and file name of the counter file.
$db_id_file_name = $db_script_path . "/default.count";
# Full path and file name of the authorization directory.
$auth_dir = $db_script_path . "/auth";
# Full path and file name of the password file.
$auth_pw_file = $db_script_path . "/default.pass";
# Full path and file name of the log file.
$auth_log_file = $db_script_path . "/default.log";
# Full path and file name of the html routines.
require $db_script_path . "/html.pl";
Shouldn't all of these paths and URL's in the default.cfg file be defined?
Code:
require $db_script_path . "/html.pl";
should be:
Code:
require $db_script_path . "/complete/server/path/to/html.pl"; and . . .
Code:
$db_script_url = $db_dir_url . "/db.cgi";
should be
Code:
$db_script_url = $db_dir_url . "http://yourdomain/whaterver/db.cgi";
should't it?


------------------
~ ~ ~ ~ ~
Karen

[This message has been edited by Karen (edited January 16, 2000).]
Quote Reply
Re: Can't get a login screen, goes straight to main menu In reply to
Karen,

First, thank you for taking the time to look at the code. I appreciate it!

I'm no Perl expert but I believe what is happening in the code you outlined is the variable "$db_script_path" gets placed at the beginning of each of those pathways, so it isn't necessary to actually spell each of them out.

I double-checked these paths on my old server where everything works properly and they are the same that I now have on the new server. Also, everything is working correctly in the database on my new server except that the login screen won't show up, so authorizations are impossible.

BTW Eliot, I made those 2 additional changes and still no dice. I'm starting to wonder if the server being password-protected has something to do with the problem.
> >