Where does Apache store user/login information?
Posted by: SpiderSpartan (---.lightspeed.tpkaks.sbcglobal.net)
Date: August 09, 2010 01:24AM

I have WAMP setup on XP with Apache 2.2.11, PHP 5.3.0, and MySQL 5.1.36. I like the how easy it is to set up security for individual directories on the server and would like to keep that the way it is.

My question is, is there a way to send the Username and password to the server using php instead of using the standard apache login popup?

The first page visitors see when they visit my sight is not password protected. I would like to add a login form to this page so that when/if users try to go to a protected page the do not have to log in using the apache popup and I don't have to create a custom index.php for every directory on my server.

After loging in I can get the username using getenv("REMOTE_USER"winking smiley but if I try to set the username with putenv("REMOTE_USER=$myusername"winking smiley it doesn't seem to work. Maybe because I'm not sending a password with it?

Thanks for any help you can give with this.

Options: ReplyQuote
Re: Where does Apache store user/login information?
Posted by: yfastud (Moderator)
Date: August 09, 2010 05:41AM

wampserver does NOT have any user and password already setup, so I think you meant the script that you're using, and in that case, you have to contact the developers of that script instead winking smiley

Have fun,

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

Options: ReplyQuote
Re: Where does Apache store user/login information?
Posted by: toumimi (---.163.192-77.rev.gaoland.net)
Date: August 09, 2010 07:03AM

Hi,

I think that you can't force Apache login through a php script and putenv should not be the solution,
since each connexion would replace this value (environment is global).

What you can do is to put WampServer offline and then use vhost to provide an url which access would be allowed. No password for the first page, but access forbidden.
You have to choose what (and how) you want to show your different websites...

Florian

WampServer Patch (Screenshots)
Topic EN : www.wampserver.com
Topic FR : www.wampserver.com

Options: ReplyQuote


Sorry, only registered users may post in this forum.