Gossamer Forum
Home : Products : DBMan : Installation :

one pass file...many databases...Argh...

Quote Reply
one pass file...many databases...Argh...
Yo, I'm back:-)

I have setup DBMan successfully a couple times, I am now setting it up for a local non-profit mothers group in my town and this is my dilemma...

I have three databases for different content, all three will share one authorization folder, .pass file, .log file (i have the logging turned off tho' right now), all .cfg files are pathed properly, and two of the three allow default users to view only (Kids Stuff For Sale and Recipe Book) the third (Address Book) is only accessable with a login so only members of the group can use it.

The method I originally used to get set up was copy the existing databases, changing the .cfg files to fit the new server, and uploading to the server. Then it would not allow me to login in with the same passwords I had in the source that I duplicated, so I downloaded a fresh DBMan, and copied the default.pass to the server hoping admin/admin would let me in, well it doesn't, I CAN however, login as a default user with the db=address&uid=default extension to the two that allow default users.

I just can't think of what I am missing, if this rambling made any sense to anyone, please help me...local moms want it:-). This forum (especially Anthro and JPDeni) have made me a significantly better & smarter Perl user, but I am stumped right now...I am locked out of my own database:-)


Quote Reply
Re: one pass file...many databases...Argh... In reply to
First, I'll deal with the default user on the address database. Have you set

$auth_allow_default = 0;

in the address.cfg file?

As for the passwords not working, it could be that the new server uses different encryption than your old server and the DBMan default.pass. There are instructions for how to get around this at http://www.jpdeni.com/dbman/tutorial2.html. Scroll down to the bottom of the page -- the last section.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: one pass file...many databases...Argh... In reply to
Hey, I am ashamed I didn't think of resetting the default to allow admin permissions...duuuuhhh...

However, that didn't work.

Heres what happens...the classifieds was already set to allow default so I just changed the permissions to 11111 for that, I logged in using the &uid=default and get into the app. when I click on any link, it gives me some sort of error. Different ones with most clicks.
I have a big footer, whcih I included below, to allow cruising from database to database as long as permissions allow. I wrote it as follows:

sub html_footer {
# --------------------------------------------------------
if ($per_del){
print qq!<P align="center" CLASS="bodymdbold">ADDRESS BOOK<BR>!;
print qq!| <A HREF="/cgi-bin/db.cgi?db=address&uid=$db_uid&add_form=1" CLASS="bodysm">Add</A> !;
print qq!| <A HREF="/cgi-bin/db.cgi?db=address&uid=$db_uid&view_search=1" CLASS="bodysm">View</A> !;
print qq!| <A HREF="/cgi-bin/db.cgi?db=address&uid=$db_uid&delete_search=1" CLASS="bodysm">Delete</A> !;
print qq!| <A HREF="/cgi-bin/db.cgi?db=address&uid=$db_uid&modify_search=1" CLASS="bodysm">Modify</A> !;
print qq!| <A HREF="/cgi-bin/db.cgi?db=address&uid=$db_uid&view_records=1&$db_key=*" CLASS="bodysm">List All</A> |!;
}
print qq!<P align="center" CLASS="bodymdbold">RECIPE BOOK<BR>!;
print qq!| <A HREF="/cgi-bin/db.cgi?db=recipies&uid=$db_uid&add_form=1" CLASS="bodysm">Add</A> ! if ($per_add);
print qq!| <A HREF="/cgi-bin/db.cgi?db=recipies&uid=$db_uid&view_search=1" CLASS="bodysm">View</A> ! if ($per_view);
print qq!| <A HREF="/cgi-bin/db.cgi?db=recipies&uid=$db_uid&delete_search=1" CLASS="bodysm">Delete</A> ! if ($per_del);
print qq!| <A HREF="/cgi-bin/db.cgi?db=recipies&uid=$db_uid&modify_search=1" CLASS="bodysm">Modify</A> ! if ($per_mod);
print qq!| <A HREF="/cgi-bin/db.cgi?db=recipies&uid=$db_uid&view_records=1&$db_key=*" CLASS="bodysm">List All</A> |! if ($per_view);
print qq!<P align="center" CLASS="bodymdbold">FOR SALE<BR>!;
print qq!| <A HREF="/cgi-bin/db.cgi?db=classifieds&uid=$db_uid&add_form=1" CLASS="bodysm">Add</A> ! if ($per_add);
print qq!| <A HREF="/cgi-bin/db.cgi?db=classifieds&uid=$db_uid&view_search=1" CLASS="bodysm">View</A> ! if ($per_view);
print qq!| <A HREF="/cgi-bin/db.cgi?db=classifieds&uid=$db_uid&delete_search=1" CLASS="bodysm">Delete</A> ! if ($per_del);
print qq!| <A HREF="/cgi-bin/db.cgi?db=classifieds&uid=$db_uid&modify_search=1" CLASS="bodysm">Modify</A> ! if ($per_mod);
print qq!| <A HREF="/cgi-bin/db.cgi?db=classifieds&uid=$db_uid&view_records=1&$db_key=*" CLASS="bodysm">List All</A> |! if ($per_view);
print qq!<P align="center" CLASS="bodymdbold">!;
print qq!| <A HREF="$db_script_link_url" CLASS="bodysm">Home</A> !;
print qq!| <A HREF="$db_script_link_url&admin_display=1" CLASS="bodysm">Admin</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&logoff=1" CLASS="bodysm">Log Off</A> |!;
print qq!</p>!;
}

Then, when I click on the "admin" link it gives me a 404 page, but, if I type in the EXACT same address that displays in the status bar manually I can get to it.
I am insanely confused, I coded the multi database links just like I did in other apps and it works...

the databases are currently at http://savagemoms.virtualave.net
Even if I go to the login page and enter admin/admin or author/author I get a 404

What did I do wrong JPD!

Quote Reply
Re: one pass file...many databases...Argh... In reply to
Did you change the $db_dir_url variable in all of the .cfg files?

I went to your site and got into the classifieds database. Seems there's no records there, yet, so the "List All" gives "no matching records."

When I clicked "Modify" I got the modify search form. When I clicked "list all" there, I got

"Netscape is unable to locate the server savagemomes.virtual.net"

Looks like there is a problem with your $db_dir_url in at least one .cfg file.

I think you would do better in your footer to use

<A HREF="$db_script_url?db=address&uid=$db_uid

instead of

<A HREF="/cgi-bin/db.cgi?db=address&uid=$db_uid

That way, if you ever have to move the databases, you'll only have to change the .cfg files, instead of all those footers.

JPD
http://www.jpdeni.com/dbman/
Quote Reply
Re: one pass file...many databases...Argh... In reply to
Nuts...I new it was somethin stupid like that typo...just need a fresh set of eyes to see it sometimes I guess...Grrrrr.

Now, I got my login working and did some mods on the footer (I had the URL hardcoded as a troubleshooting methods...didn't see the typo:-()

OK, so I got admin/admin working, so I can get into any one database. Now if I get into one of the using anything but the &uid=default the $db_uid doesn't pass from thru the links to the other databases...this is the new footer:

sub html_footer {
# --------------------------------------------------------
print qq!<P align="center" CLASS="bodymdbold">ADDRESS BOOK<BR>!;
print qq!| <A HREF="$db_script_url?db=address&uid=$db_uid&add_form=1" CLASS="bodysm">Add</A> ! if ($per_add);
print qq!| <A HREF="$db_script_url?db=address&uid=$db_uid&view_search=1" CLASS="bodysm">View</A> ! if ($per_view);
print qq!| <A HREF="$db_script_url?db=address&uid=$db_uid&delete_search=1" CLASS="bodysm">Delete</A> ! if ($per_del);
print qq!| <A HREF="$db_script_url?db=address&uid=$db_uid&modify_search=1" CLASS="bodysm">Modify</A> ! if ($per_mod);
print qq!| <A HREF="$db_script_url?db=address&uid=$db_uid&view_records=1&$db_key=*" CLASS="bodysm">List All</A> |! if ($per_view);
print qq!<P align="center" CLASS="bodymdbold">!;
print qq!| <A HREF="$db_script_url?db=classifieds&uid=$db_uid&login=1" CLASS="bodysm">For Sale</A> !;
print qq!| <A HREF="$db_script_url?db=recipies&uid=$db_uid&login=1" CLASS="bodysm">Recipe Book</A> |!;
print qq!<P CLASS="bodysm" align="center">!;
print qq!| <A HREF="/index.shtml" CLASS="bodysm">Home</A> !;
print qq!| <A HREF="$db_script_link_url&admin_display=1" CLASS="bodysm">Admin</A> ! if ($per_admin);
print qq!| <A HREF="$db_script_link_url&logoff=1" CLASS="bodysm">Log Off</A> |!;
print qq!</p>!;
}

This was so easy on some other installations...what the heck am I just not getting?!?

Quote Reply
Re: one pass file...many databases...Argh... In reply to
never mind JP, a few months ago you taught me to NOT pass the &login=1 when jumping between databases...I remembered that on the buss going to work this morning...buses going downtown ROCK...it gives a guy time to think:-)

Thanks again, and the offer of dinner I made a few months ago still stands if your in Minneapolis anytime...it's the least I can do:-)

Dan

Quote Reply
Re: one pass file...many databases...Argh... In reply to
I'm glad that something I wrote stuck with you. Smile

I'll be sure to look you up if I ever get to Minnesota. Thank you for the offer.

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