We are having a problem when we turn on clean URL's. It seems that when we have clean URL's on, the path gets rewritten correctly, but for some reason the REMOTE_USER server variable does not exist. That means that everyone is now anonymous. The user name that should be in REMOTE_USER is set in REDIRECT_REMOTE_USER (as of apache 2.0.48) though, so I made the following change to allow clean URL's to still work while using webserver_auth. Not sure why this is happening for us, but in case anyone else has this problem, I thought I'd pass along this information...

< if ($name = $_SERVER["REMOTE_USER"]) {
---
> if (($name = $_SERVER["REMOTE_USER"]) || ($name = $_SERVER["REDIRECT_REMOTE_USER"])) {

Comments

moshe weitzman’s picture

can anyone else confirm this? i have only used this module on IIS.

jsloan’s picture

My server setup is: Windows 2003, Apache/2.0.54 (Win32), mod_auth_sspi/1.0.1, PHP/5.0.4, I am using Clean URL's and I'm not having a problem with the REMOTE_USER variable. What is the server setup for the problem case?

justaguru’s picture

Setup is:
Apache 2.0.42
Php 4.3.8
Linux (SLES9)

carmady’s picture

Independent confirmation - I'm seeing this problem too and the suggested fix does fix it.
Server config is:

Setup is:
Apache 2.0.55
Php 5.1.2
Debian Linux (Etch)

moshe weitzman’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)