Gossamer Forum
Home : Products : DBMan : Installation :

Cookies

Quote Reply
Cookies
I've posted this question before and people seem to be interested in doing it so if anyone has implemented cookies into dbman, let us know. So something like this forum, you enter your username/password and it saves as a cookie. I guess there is still an interest in being able to get username/passwords sent by email if the user forgets -- so if anyone has that implemented, I'm sure a lot of people on here would be interested in that as well. Thanks a bunch.


------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: Cookies In reply to
I don't have cookies, but I have worked out (I think) a way to have the username and password sent to the user.

If you'd like to check it out, go to
http://www.drizzle.com/~hall/cgi-bin/test/db.cgi

It's just the demo info, but you can see how (and if!) the sending of username and password works for you. The "admin/admin" login has been deleted.

One big caveat! I took out all encryption. If anyone can access the directory where your dbman resides, they can read the password file without having to try to unencrypt anything. Before you try any of this, make sure that your directory is not accessible from the web.

If, after you try it out, you're interested in adding this yourself, I'll put together instructions on how to do it.


------------------
JPD
Quote Reply
Re: Cookies In reply to
If you have a chance, e-mail me the info. I don't have a real use for it, but I am interested in what you did. Smile Thanks.
Quote Reply
Re: Cookies In reply to
This is exactly the what I would like to do. Is it possible to have a screen saying "your password has been sent" or something like that after you type in your address instead of just going back to the login screen? If you could post the stuff that you did, that would be great. Thanks for your help.


------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: Cookies In reply to
I would also like to get info on how to implement the e-mail of username and password.

------------------
Thanks in advance,
Todd
tbullock@tca.net
Quote Reply
Re: Cookies In reply to
Okay. I'm not going to be able to get to it tonight, but I'll see what I can get done tomorrow. It won't be posted on the forum, though. I'll give you a URL where you can get a textfile of the changes.



------------------
JPD
Quote Reply
Re: Cookies In reply to
Sounds good. Thanks for the help!


------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: Cookies In reply to
Okay, folks, the mod for allowing users to be able to have their user names and passwords mailed to them is up on my site. You can get to it by going to

http://www.drizzle.com/~hall/dbmod/lookup.txt

Just save the text file to your computer and follow the directions.

Jason, the screen the user sees after the email is sent looks (and acts) like the login screen, but it does say that the email has been sent. I just thought it was nicer not to make the user backtrack to the login screen.



------------------
JPD
Quote Reply
Re: Cookies In reply to
JPD I modified my files as directed. When I ran the db.cgi I go the following.

Error Message : Error loading required libraries.
Check that they exist, permissions are set correctly and that they compile.
Reason: Missing $ on loop variable at /home/sites/aamc.net/cgi-bin/dbman/html.pl line 979.


Here is the code in that area:

Code:
if ($auth_signup) {
print qq|<P><$font>If you do not have an account, you can
<a href="$db_script_url?db=$db_setup&signup_form=1"> sign up for one online</a>.</font><P>
|;
}

if ($auth_lookup) {
print qq|<$font>If you have already signed up for an account, and have forgotten your
user name or password, you can <a href="$db_script_url?db=$db_setup&lookup_form=1">have it emailed to you.</a></font>|;
}

Any ideas?

------------------
Thanks in advance,
Todd
tbullock@tca.net
Quote Reply
Re: Cookies In reply to
Make sure that you close off the print qq| before the if statement -- so just plug in a |; There are several instances where you may need that but it works. I have it running on my home computer.

Hope that solves your problem.


------------------
Jason
Extreme mtb
http://extreme.nas.net
Quote Reply
Re: Cookies In reply to
I am having the same problem as PokiMo.
I tried including |; before the if statements

but then I started to get syntax errors throughout the script. Any Ideas or suggestions?
TIA

[This message has been edited by fum3 (edited February 02, 1999).]

[This message has been edited by fum3 (edited February 02, 1999).]
Quote Reply
Re: Cookies In reply to
This still did not fix the problem. I'm not a scripter, though I have begun to learn. I do appreciate any help to get this feature working.

------------------
Thanks in advance,
Todd
tbullock@tca.net
Quote Reply
Re: Cookies In reply to
If you have get a message that says you have an error on a line, it doesn't mean the error is really anywhere around the line, just that it's somewhere before it.

The only way anyone can help you to debug your scripts is if you make your script available as a text file somewhere on your website and let us know where it is.

Please realize that the user lookup is not a feature that is supported by Gossamer Threads. It's merely a modification I made.



------------------
JPD
Quote Reply
Re: Cookies In reply to
I think I found your problem.

Code:
<b>Log On</b></font></center><br>
<$font>Welcome! You need to have an active account to access $html_title.
<P>
if ($auth_signup) {
print qq|<P><$font>If you do not have an account, you can

You need to add a |; after the <P>.



------------------
JPD
Quote Reply
Re: Cookies In reply to
JPDeni thanks for taking the time to make the mods and for helping idiots like me. Smile

I do realize that these are modifications to the original script and not supported by Gossamer Threads, Inc.

I have made text version avaliable at my site for those wishing to help. The URL is:
http://www.aamc.net/test/


------------------
Thanks in advance,
Todd
tbullock@tca.net
Quote Reply
Re: Cookies In reply to
I have a different (simpler) method for this forgotten password dilemma. When a user first creates an account, an email is sent to them with their Username and Password (using sendmail). Of course, you have to add a mandatory email address field to the sign up form. Also, In case they lose the Email that is sent (God forbid!), I also have DBMAN set up to write their username and password to a text file located in a different folder (outside of the dbman dir, of course). That way I can 'manually' send them their login info.
This seems pretty safe to me, but if anyone see's any flaws in my logic, please inform me :-)
Quote Reply
Re: Cookies In reply to
That'll work, luthien. I just think that if you have the passwords unencrypted anywhere there's a risk to security and you might as well not have to worry about a separate file.

Nice thing about this, though, is that there's more than one way to do just about everything! Smile

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