Lunarpages Web Hosting Forum

Author Topic: $ENV{'REMOTE_USER'} question  (Read 3208 times)

Offline kliot

  • Spaceship Navigator
  • *****
  • Posts: 86
    • http://lacis.com
$ENV{'REMOTE_USER'} question
« on: July 11, 2004, 10:16:50 AM »
I'm trying to get the username of a user that has logged in, I'm using

$RemoteUser=$ENV{'REMOTE_USER'};
print "RU: ".$RemoteUser;

and all I get is a blank variable. It appears that then $ENV is only returning the remote user for the directory were the script is run from, ie: if I password protect that cgi-bin directory it returns the remote user name. How can I get the remote user name for another directory.

Perrin

Offline Ripta

  • Master Jedi
  • *****
  • Posts: 1271
$ENV{'REMOTE_USER'} question
« Reply #1 on: July 26, 2004, 09:58:13 PM »
I don't think you can retrieve the username for a password protected directory from an unprotected one. Even if you try retrieving from a protected directory, the realm must be the same (afaik, anyway).
GetAFreelancer! (This service is not affiliated with Lunarpages)