Preserved Topic: apache authentication - get username (Page 1 of 1) |
|
---|---|
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-09-2002 16:26 |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 01-09-2002 19:14 |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-09-2002 20:09
thanks max. this requires php as a apache cgi module. |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
posted 01-09-2002 20:54
i got it to work now. |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 01-09-2002 20:55
I'm pretty sure you don't need PHP as a CGI module. Do your regular .htaccess/.htpasswd configuration to force authentication. Then Apache will pass the logged in username to the environment variable $PHP_AUTH_USER. I guess the preferred way to access that would be (correct me if I'm wrong Max): |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
posted 01-09-2002 22:33
Regarding that Apache module vs. CGI module thing, this is the quote from PHP manual: |