Web Logon with Username and password
Posted by: Cheekz185 (---.nyc.res.rr.com)
Date: August 15, 2006 06:51PM

Is it possible when i enter my server/website that it pops up with a dialog that asks for a username and password?? If so how would i do that?

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (72.236.169.---)
Date: August 15, 2006 06:57PM

Use .htaccess and .htpasswrd
Hope this help

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: Cheekz185 (---.nyc.res.rr.com)
Date: August 15, 2006 06:59PM

what do you mean to use those files? Are they located in the wamp directory? Cna you elaborate a litteL

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (72.236.169.---)
Date: August 15, 2006 07:29PM

Ok, here it is. Save this basic code below as .htaccess, remember not as htaccess.txt or .htaccess.txt

AuthUserFile C:/wamp/www/.htpasswd
AuthName "Private Area"
AuthType Basic
<Limit GET POST>
require valid-user
</Limit>

And save this code below as .htpasswd

username:password

Replace username and password with your real ones; then put them both in wamp/www folder. Assume you install wampserver in C drive, if not, replace with the right one.

Or read my second post here if just want to protect from outsiders, eliminate the need to enter username and password each time access your page.

[forum.wampserver.com]

Hope this help



Post Edited (08-15-06 19:34)

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: Cheekz185 (---.nyc.res.rr.com)
Date: August 15, 2006 08:05PM

It WAS working but when i opened .htaccess i accidently opened it woth notepad and "automatically use this program everytime..." was check. But i deleted the .htaccess file in "file types" but still no good. I tried creating a new one and it saves but the file does not have a name when you are looking at it just as an icon!. but when you open it in notepad it says .htaccess

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (72.236.169.---)
Date: August 15, 2006 08:54PM

Don't understand what you mean. What's your problem now? When save with notepad, you should put in the double quote like this ".htaccess"
Hope this help

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (72.236.169.---)
Date: August 15, 2006 09:11PM

Also remember to uncheck "Hide extension for known file type" in Tools/Folder Option/View in windows, so you can see the real extension for your files

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: Cheekz185 (---.dyn.optonline.net)
Date: August 16, 2006 04:12AM

Hey thanks for you help! I got it working i just needed to restart the system. I have one more question. I have a little application that send GPS Coordinates from my car to a file on my server. When i logon my server from any computer i can actually see the plotted coordinate s using Google Maps. I was wondering, now that i have a password on my server the coordinates do no go through to the file on my server. Is there anyway I can bypass this?

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (72.236.169.---)
Date: August 16, 2006 02:16PM

Sorry, wrong forum for that question.

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: Cheekz185 (---.nyc.res.rr.com)
Date: August 16, 2006 08:36PM

Is there any possible way to embed the username/password logon into the website instead of a dialog that pops up?

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (---.cable.mindspring.com)
Date: August 17, 2006 11:36PM

What a point of having username and password if they've already embeded?

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: Cheekz185 (---.dyn.optonline.net)
Date: August 18, 2006 01:26AM

What i mean is embed the diaglog window into the website. Not the username/password

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (---.cable.mindspring.com)
Date: August 18, 2006 02:44AM

php + .htaccess, but not sure how. Google it.

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: Andy (---.cable.ubr11.azte.blueyonder.co.uk)
Date: August 23, 2006 04:47AM

Hi all,

In IE there is a setting that allows the support for this. If enabled (IE 6 and above it's not by default) you can type in a URL usiing the following format

<<username>>:<<password>>@<<URL>>

Ie.

andy:mypassword@www.google.co.uk

I don't know which GPS system you use, nor can I say whether it will work with this format, but it is worth a try.

Andy.

P.S. like I say, to try it in IE6 and above requires a change to your settings. Have a look through TOOLS>INTERNET OPTIONS, it's under ADVANCED if ya need to change it.


ANdy.

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: si458 (---.net)
Date: September 17, 2006 08:10PM

hi

i got the uesrname and password working for a site so i go [localhost] and it says give me a password and user and it works

but when i login to my phpmyadmin

from [localhost] it keeps coming up with ether
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

or

Welcome to phpMyAdmin 2.8.2.4

Wrong username/password. Access denied.

why this happen?

thanks



Post Edited (09-17-06 21:17)

SASmith

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (---.mia.bellsouth.net)
Date: September 17, 2006 10:00PM

If I''m not wrong; With phpmyadmin, use your mysql username and password, by default username is root and no password. If using .htaccess and .htpasswrd, have to log in twice.
Hope this help.

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: si458 (---.net)
Date: September 18, 2006 08:16AM

well that is stupid



SASmith

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: yfastud (---.cable.mindspring.com)
Date: September 19, 2006 12:38AM

Yep, you're right. Think again, I'm so stupid to answer your question. That's why it's been a while I didn't want to answer any question because while the replier mostly base on his own experience or setup to answer the question, then instead simply say "I don't agree with your idea", people just throw a very bad attitude.

For example, in one post, while answer the question about setup username and password, someone suggested to setup cookies instead htaccess and cyberspatium tried to explain about it and receive a bad comment even it's right. Similar, my stupid answer above base on my stupid setup, which combines both cookies and htaccess, that forces the users to provide 2 sets of username and password: first set to get through htaccess and get into the site that contain phpmyadmin; then, second set to get into phpmyadmin to access his database only. This is kind of "stupid idea" since first level to prevent strangers and second level to prevent the user to mess with other user's database.

Anyway, I guess I should be out of this forums for a while because I don't think people like stupid one like me fool around here.

Good luck to you all.

Options: ReplyQuote
Re: Web Logon with Username and password
Posted by: si458 (---.net)
Date: September 19, 2006 05:17PM

what do you mean?

i dont get you



SASmith

Options: ReplyQuote


Sorry, only registered users may post in this forum.