From: vahan at arminco dot com Operating system: Windows XP SP1 PHP version: 5.0.0 PHP Bug Type: Unknown/Other Function Bug description: no PHP_AUTH_USER under Apache 1.3.28
Description: ------------ HTTP auth doesn't work because $_SERVER['PHP_AUTH_USER'] is not being set, while $_SERVER['PHP_AUTH_PW'] is there as shown by phpinfo() to reproduce: create this file: <?php if (!isset($_SERVER['PHP_AUTH_USER'])) { header('WWW-Authenticate: Basic realm="My Realm"'); header('HTTP/1.0 401 Unauthorized'); echo 'Text to send if user hits Cancel button'; exit; } else { echo "<p>Hello {$_SERVER['PHP_AUTH_USER']}.</p>"; echo "<p>You entered {$_SERVER['PHP_AUTH_PW']} as your password.</p>"; } ?> access the file, when it gives you the user/pass box, alter the script, adding phpinfo() in the 2nd line, and type something as user and password. phpinfo() shows PHP_AUTH_PW but no PHP_AUTH_USER. all auth fails because of this, tested on windows 2003 professional and windows 2000 sp4 servers as well, with apache 1.3.28 and php-5.0.0 installed as module. -- Edit bug report at http://bugs.php.net/?id=29161&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29161&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29161&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=29161&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=29161&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=29161&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=29161&r=needscript Try newer version: http://bugs.php.net/fix.php?id=29161&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=29161&r=support Expected behavior: http://bugs.php.net/fix.php?id=29161&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=29161&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=29161&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=29161&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29161&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=29161&r=dst IIS Stability: http://bugs.php.net/fix.php?id=29161&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=29161&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=29161&r=float