It seems that the _deduceUsername() function in
lib/main.php is using the HTTP_ENV_VARS array to attempt
to determine the REMOTE_USER variable for HTTP based
As best I can tell, this code should be be using
HTTP_SERVER_VARS to discover REMOTE_USER. I think
HTTP_ENV_VARS could only contain REMOTE_USER phpwiki
caller set this in the processes environment explicitly. (This
may be true if php is invoked as a CGI or from the command
line. I'm not familiar with this.)
Nonetheless, when phpwiki is run via mod_php,
REMOTE_USER won't be found in HTTP_ENV_VARS.
Diff snippit for lib/main.php from 1.3.10. Seems to be in
current CVS too, though. Interestingly, the SOAP auth
portion of _deduceUsername in CVS includes
HTTP_SERVER_VAR checking for REMOTE_USER.
< if (!empty($HTTP_ENV_VARS['REMOTE_USER']))
< return $HTTP_ENV_VARS['REMOTE_USER'];
if (!empty($HTTP_SERVER_VARS['REMOTE_USER'])) return $HTTP_SERVER_VARS['REMOTE_USER'];
Log in to post a comment.