Gossamer Forum
Home : Products : DBMan : Installation :

User Unable to View Db

Quote Reply
User Unable to View Db
Thank you for sharing DBMan

However, my setup is not working.

I would like my users to log on to add,remove, modify but be able to VIEW without logging on.

Therefore, I've set the defaults according to your suggestions.
$auth_no_authentication = 0;
$auth_allow_default= 1;
@auth_default_permissions = (1,0,0,0,0);
$auth_modify_own = 0;
$auth_view_own = 0;
@auth_signup_permissions = (1,0,0,0,0);
$auth_user_field = 9;
$auth_logging = 1;

Setting the db.cfg file to the above selections, however, does not allow the user to VIEW option. Instead, the database returns the HOME, ADD, LOGOFF option.

How do I change the defaults so that the "user window" returns options which includes HOME, VIEW, LOGOFF?
Quote Reply
Re: User Unable to View Db In reply to
Do you know what kind of server software is on your system? There could be a problem with server authentication. Give this a try. In auth.pl, comment out the line

my ($server_auth) = $ENV{'REMOTE_USER'} | | $ENV{'AUTH_USER'};

(That is, put a # at the beginning of the line.) That may do it for you.


------------------
JPD





Quote Reply
Re: User Unable to View Db In reply to
JPDeni, Good to hear from you again. Thank you! Yes, the script works. But it doesn't work properly when I change defaults. This means that all the functions work as originally programmed. But I need to limit the user rights to Search and View all only.

When I change the $auth_no_authentication to "1", it allows the user to VIEW the db. However, this also removes the ADD, MODIFY, and DELETE rights of the the admin being that the admin person can't login to tell the program "I'm the admin! I have additional rights!"

Thanks again for your assistance.- joie
Quote Reply
Re: User Unable to View Db In reply to
Thanks for your immediate response! However, your suggested fix still doesn't allow the user to VIEW the db. Therefore, it still gives me only the HOME, ADD, LOGOFF menu.

The school runs the UNIX/Solaris system.

I tried changing the default settings on permissions. But I still couldn't get it to work.
Quote Reply
Re: User Unable to View Db In reply to
What happened when you tried the demo that came with the script? Did it work before you changed the permissions?


------------------
JPD





Quote Reply
Re: User Unable to View Db In reply to
That means that there is something in your default.cfg file that's not right. Could you copy your default.cfg file to a web-accessible directory and rename it with a .txt extension so I could take a look at it? I'm so used to looking at the format of the file, that it's hard for me to get things straight when I see them listed the way you have them on the board.


------------------
JPD





Quote Reply
Re: User Unable to View Db In reply to
Sorry, JPD, I don't have a web accessible directory. So I emailed my config file (text format) to alex@gossamer-threads.com.

I hope that's acceptable.
Quote Reply
Re: User Unable to View Db In reply to
JPD, in case the server will require you to enter a username/password, please use guest/guest.

Regards,
Quote Reply
Re: User Unable to View Db In reply to
Please don't send scripts as attachments to email messages to either me or Alex. There are a whole lot of reasons for this.

They can clog up our mailboxes pretty quickly.

With viruses going around, I usually delete any email with attachments unless I'm already expecting it.

It's a lot easier to connect the problem with the script if you have a link to a web page within the discussion forum. If I get an email with a script attached, I then have to come back to the forum and search for what the problem is so I know what I'm looking for.

If the script is available on the web, anyone can help. Many times a different eye will find something that I or even Alex would miss. You have a better chance of finding a solution to your problem.

When I offer help on the forum, I don't expect anything in return (except for a nice "thank you"! Smile ). But I also would like to be able to answer people's questions on the forum so that others have the opportunity to learn as well. It very well may be that in a week or two someone else will come up with your same problem and be able to read the solution to it right here.

I'm assuming that, if you're going to be using DBMan, you have a website. You just need to copy your files in the same directory where you have your html files and rename them to have a ".txt" extension. If you really don't have any webspace where you can upload your files, you can get space at any number of free sites. Geocities is one that is fast and easy to join and allows you to ftp your files to your free webspace. You just have to be sure that the files have a ".txt" extension.

Please don't think I'm mad at anyone for sending files. I'm not. I hope you understand.

However, since you sent your script to Alex and he forwarded it to me, I'll see what I can answer about your problem.

First off, it's probably not a good idea to rename db.cgi to anything else.

You have

$auth_user_field = 9;

But you don't have a field number 9. This will cause major problems in your database. If you want registered users to be able to modify or delete their own records, you will need to create a field to hold the userid for each record and set the $auth_user_field to the number of that field. You'll also need to set

$auth_modify_own = 1;

If you want registered users to be able to modify or delete any record (not a good idea), you won't need an $auth_user_field. Set

$auth_user_field = -1;

I went to your database on the web and I didn't see the problem you're talking about. When I used the URL
http://wwwultra.sce.nyu.edu:6306/cgi-bin/phonebk/phone.cgi?db=phone&uid=default

(which is the correct URL for a default user), I was able to view the records with no problem.

I did see something else, though, and I'm not sure why. When I went to
http://wwwultra.sce.nyu.edu:6306/cgi-bin/phonebk/phone.cgi
I got the Main Menu. When I clicked on "List All" I was sent to the login page. The URL above should have sent me directly to the login page. Did you make any changes in db.cgi (or, as you renamed it, phone.cgi)?


------------------
JPD





Quote Reply
Re: User Unable to View Db In reply to
JPD,
Sorry for not having taken time to respond. I had to recover from being shred to pieces in your last reply.

First of all, I AM VERY grateful that you are not only sharing your script but that you are also taking time to help novices like me.
Second, I DO understand the benefits of posting the problems and resolutions on your BB. I actually read a whole years worth of your archive before I posted my problem to avoid duplication.

Third, I emailed you my file because I honestly didn't know how send you the file according to your first instruction. Of course, your instructions in your last reply makes it very obvious now. But programming is a new experience for me. And I am still learning all these technical "language".

I hope you understand that I did not mean to inconvenience you.

Regarding the problem, it turns out that the permissions in the password file (default.pass) was incorrect. The program kept returning the "ADD" permission bec. that was the permission granted each user. So when this permission was changed to VIEW, the program worked as specified.

Again, thank you kindly for all your assistance.

And please thank Alex for forwarding my email to you.

Best regards,
Quote Reply
Re: User Unable to View Db In reply to
I'm glad you found the answer to your problem.

I really didn't mean to shred you to pieces. I've been meaning to say that for a while and this was just the opportunity I had to say it. I meant it when I said that I'm not angry with you or anyone else who has sent me files.

I should have been clearer on what I meant by a "web accessible" directory. It's hard sometimes to remember that not everyone uses the same language for things and I need to be more specific.

Please don't feel bad. And please don't hesitate to ask if you have any other problems. I won't yell at you. I promise!


------------------
JPD