Gossamer Forum
Home : Products : DBMan : Customization :

Expired Guest Key

Quote Reply
Expired Guest Key
I made a front screen to my database and did a few custom searches under guest, list all, new records, etc. I then just copied the url generated and pasted it under the links. The main screen is just an HTML page... and the List All link is just a default/guest login and call to "List All".

DUH, I forgot to account for the session ID expiring. I uploaded the screens... and now 6 hours later users cannot use these settings "session expired".

Please help if you can, I have to fix this quickly as my whole project is now offline until I do.

If I did not make it clear, restated: where should I look to modify this? Create a guest user with more privs... or change the key code (or remove it) in the URL to something that does not expire?

Quote Reply
Re: Expired Guest Key In reply to
I don't knwo whether this is what you needed but why don't you try to add a new level of permissions to the database? Basically, with a new level of permission, you can then specify what that user can do in the database.

For example, if users log in as guest/guest - in my database they can only view and search. They can't do anything else. I have also congfigured it not to allow them to change password. If you need the mod that allows you to do so, go to the resource section and look for a mod named "Add Permission".

Julian
Quote Reply
Re: Expired Guest Key In reply to
Would this do it? I am somewhat in doubt that I stated my case clearly. Say one were to log into the database as guest/guest. Then hit the "List All" link... if I were to copy this link...

http://www.doman.name/cgi-bin/db/db.cgi?db=default&uid=guest.96491929192644&view_records=1&ID=*&sb=1

and then create a static HTML page as my front end to the database and have a "List All" button with the above link pasted into it (thereby not requiring them to login as guest/guest. The session key/number is the problem... (i.e. "96491929192644") it expires after a certain degree of time. I get around it by setting the time at about 18 hours... but I have to redo the whole html page every 18 hours and upload it to refresh the session key. Can't I make this permanent? Is what you say ... ie. permissions... where I would look to change this? Or is it somehow/someway I need to set a permanent session key that does not expire?

Quote Reply
Re: Expired Guest Key In reply to
Actually, is there any reason why you would want to create a static html page for your users? Would it save you all the trouble if you just give them the guest permissions? I don't know. Each of us wants a different format for our databases. Unless there is some reason why you want to create a static html page for users, the solution I stated would be the easiest. That way, users that don't register can still have access to your database and yet they are limited to what they can do and saves you the trouble of creating a static html page.

I understand your problem now, and sad to say, I'm a novice at Perl and hence can't help you much in your question.

Julian
Quote Reply
Re: Expired Guest Key In reply to
Yes... sadly, the level of users ranges. Many were VERY intimidated by the passord login screen. Many would type their AOL username... thinking this was what it was asking for. Many would just give up... even though the directions were clear, when people get intimidated, they have a mental block. I even started filling in guest/guest as the default, but they would not hit "Login" and would send me notes saying they are having trouble. I needed a one button get them into the listings... then worry about if they needed to create an account later.

Maybe JPDenni could make a "Do what I mean" button for DBman... or for Windows for that matter. I know that would be very popular. ;^)

Quote Reply
Re: Expired Guest Key In reply to
The links you are trying to use:

db.cgi?db=default&uid=guest.96491929192644&view_records=1&ID=*&sb=1 will not work from a static page. The session ID is generated with each user and will change with each user.

I think what you want is to enable default users to acess your database and if that is the case then your links would be:

db.cgi?db=default&uid=default&view_records=1&ID=*&sb=1

Please check the FAQ noted below under "Linking & Sorting" as there are several thread references and examples provided.

Hope this helps


Unoffical DBMan FAQ
http://webmagic.hypermart.net/dbman/
Quote Reply
Re: Expired Guest Key In reply to
I've done something similar with a search field. You basically use the same process whether you're trying to "List All" or provide a search function or whatever. I'm assuming from what you've written that you're allowing "default" users to view, search, etc your database.

Here is sample search code:

Code:
<form action="/cgi-bin/dbman/db.cgi" method="POST" name="form1">
<input type=hidden name="db" value="name of your db">
<input type=hidden name="uid" value="default">
<INPUT TYPE="TEXT" NAME="keyword" SIZE=15 MAXLENGTH=255>
<p><center>
<INPUT TYPE="SUBMIT" NAME="view_records" VALUE="Search!">
<INPUT TYPE="RESET" VALUE="Clear">
</center></p></form>
Basically, you need to provide in hidden fields the name of the database and the username of default and wrap it in a form that provides the path to your db.cgi file. This should allow anyone to search the database without having to log in and without you needing to re-upload the page due to expired sessions.


Melanie
http://www.somemoorecats.com/
http://www.okhima.org/
Quote Reply
Re: Expired Guest Key In reply to
Yes. Actually got it to working last night with the default/defualt scenario. Thanks for all your help.

I liked the form approach... looks interesting.

One more question and I can put this to bed. I am using the "New Records" Mod for one of the buttons. (same deal, residing on a static page outside the database, but making a call to the database). I had to paste the code in from default/default, but the date was not a variable, just today's date... which means that I would have to change this every day. I am at least improving from 3 links every 18 hours to one link every 24 ;^) I will have to look at the Date-gt function and see how I can do it. Any suggestions?