Google Answers Logo
View Question
 
Q: Can PHP see Apache .htaccess username? ( No Answer,   1 Comment )
Question  
Subject: Can PHP see Apache .htaccess username?
Category: Computers > Internet
Asked by: pnoeric-ga
List Price: $5.00
Posted: 05 Aug 2003 12:49 PDT
Expires: 05 Aug 2003 15:24 PDT
Question ID: 240380
I'm writing some code in PHP and want to use Apache's .htaccess to
control user access to a directory. Is there a way, after someone is
cleared into a directory with .htaccess, that I can securely retrieve
their username
from the server? I.e. I want PHP to find out what they typed to get
past the .htaccess dialog. If this isn't built into Apache, is there a
plug-in module that I can add to the server which will let it do this?
Answer  
There is no answer at this time.

Comments  
Subject: Re: Can PHP see Apache .htaccess username?
From: vladimir-ga on 05 Aug 2003 14:10 PDT
 
pnoeric-ga,

The username in question can be read from the $REMOTE_USER variable.
Depending on local configuration you may have to use
$_SERVER['REMOTE_USER'] instead.

Hope this helps.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy