in reply to Re^2: Basic HTTP Authentication
in thread Basic HTTP Authentication

Could there be something that needs enabling in apache to allow for the REMOTE_USER and REMOTE_PASSWD variables to be shown?
Yes, it's my understanding that you have to use the basic auth Apache stuff. No level of triggering it from a user program will work, as noted in that 4-year-old thread you referenced as well. It doesn't do any good to trigger an "auth required" status from a CGI script.

For Apache 2, the relevant module is mod_auth_basic, and numerous tutorials exist about how to configure it.