![]() Preserved Topic: apache authentication - get username |
|
---|---|
Author | Thread |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() |
Maniac (V) Mad Scientist From: Belgrade, Serbia |
![]() |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() thanks max. this requires php as a apache cgi module. |
Paranoid (IV) Mad Scientist From: Omicron Persei 8 |
![]() i got it to work now. |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
![]() 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 |
![]() Regarding that Apache module vs. CGI module thing, this is the quote from PHP manual: |