in reply to CGI getting htaccess userid

Either
1) the script is not being run by Apache, or
2) the script is not being protected.

Make sure the htaccess is protecting the CGI's directory/file/location and that it protecting all submission methods (GET and PUT, and any other allowed method) for the directory. I've seen lots of .htaccess that use
<Limit GET>Require valid-user</Limit>
instead of just
Require valid-user
Omit the Limit. Why would anyone want to limit their security to just one submission method?

Replies are listed 'Best First'.
Re^2: CGI getting htaccess userid
by Happy-the-monk (Canon) on Jan 11, 2006 at 19:40 UTC

    Try an additional print "env-remote_user: $ENV{REMOTE_USER}<br />"; which will also show you if it is set or not.

    Cheers, Sören

      CGI's remote_user is simply

      sub remote_user { return $ENV{'REMOTE_USER'}; }

      No difference.