I cannot seem to get the Windows username of the logged in user via Php / Apache.
I have downloaded and added this module in Apache:
LoadModule authnz_sspi_module modules/mod_authnz_sspi.so
But when I call this from PHP via:
print $_SERVER['REMOTE_USER'] ;
I still get: Notice: Undefined index: REMOTE_USER. Please note this is an intranet site so running on an internal LAN. The server hosting the site is XAMPP.
I have also tried this: Apache - how to get REMOTE_USER variable but I am getting a prompt to re-enter my username and password (using Chrome and IE) something which I do not want. I also added this to my httpd.conf:
<Directory "C:/xampp/htdocs">
Options None
AllowOverride All
Order allow,deny
Allow from all
#AuthName "SSPI Protected Place"
AuthType SSPI
SSPIAuth On
SSPIAuthoritative On
SSPIOfferBasic On
SSPIOmitDomain On
Require valid-user
</Directory>