Lunarpages Web Hosting Forum

Scripting Languages Hosting Help => C++ / PERL / CGI Support => Topic started by: kliot on July 11, 2004, 10:16:50 AM

Title: $ENV{'REMOTE_USER'} question
Post by: kliot 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

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.

Title: $ENV{'REMOTE_USER'} question
Post by: Ripta 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).