From: pliu at eiu dot edu Operating system: Windows XP PHP version: 5.3.0 PHP Bug Type: CGI related Bug description: $_SERVER['PHP_AUTH_USER'] is not in header
Description: ------------ $_SERVER['PHP_AUTH_USER'] does not pass the parameter to header. This same problem was reported and was supposed to be fixed on version PHP 5.0. Now, it happens again with Zend Server CE (PHP 5.3.1). Reproduce code: --------------- <?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>"; } ?> Expected result: ---------------- After entering username and password, the username and password will be displayed on the web page. Actual result: -------------- In IE, the authentication window will ask 3 times for username and password. Then, it closes, and displays "Text to send if user hits Cancel button." In Firefox, it keeps asking for the username and pssword. -- Edit bug report at http://bugs.php.net/?id=49728&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49728&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49728&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49728&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49728&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49728&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49728&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49728&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49728&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49728&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49728&r=support Expected behavior: http://bugs.php.net/fix.php?id=49728&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49728&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49728&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49728&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49728&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49728&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49728&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49728&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49728&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49728&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49728&r=mysqlcfg