|
Posted by Simon Harris on 03/07/07 22:06
Hi All,
I am trying to get the username of the currently logged on user.
- The protected directory is /admin, within which is .htaccess as follows
AuthName "mysite.co.uk - Admin"
AuthType Basic
AuthUserFile /usr/local/psa/home/vhosts/mysite.co.uk/httpdocs/.htpasswd
require valid-user
- In the root of my site, is the .htpasswd file, containing
username/password pairs
- When I go to /admin, I am prompted for credentials. I enter these and am
allowed in
- On /admin/index.php I have tried the following:
$authUser = $_SERVER['LOGON_USER'];
and...
$authUser = $_SERVER['PHP_AUTH_USER'];
Both return an empty string/null when printed to the page
Any help would be much appreciated.
Thanks,
Simon.
--
--
* Please reply to group for the benefit of all
* Found the answer to your own question? Post it!
* Get a useful reply to one of your posts?...post an answer to another one
* Search first, post later : http://www.google.co.uk/groups
* Want my email address? Ask me in a post...Cos2MuchSpamMakesUFat!
--------------------------------------------------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 5057 spam emails to date.
Paying users do not have this message in their emails.
Try SPAMfighter for free now!
[Back to original message]
|