From: endrju at itrisinajumi dot lv
Operating system: FreeBSD 5.2.1
PHP version: 5.0.0
PHP Bug Type: Zend Engine 2 problem
Bug description: $_SERVER["PHP_AUTH_USER"] is not in headers anymore?
Description:
------------
When making HTTP authentication there is no $_SERVER["PHP_AUTH_USER"] in
headers (but there is $_SERVER["PHP_AUTH_PW"]).
I noticed this when i upgraded to PHP 5.0.0 and checked phpMyAdmin - it
hanged. After some investigation I found that there's no
$_SERVER["PHP_AUTH_USER"] in headers.
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-openssl'
'--with-imap=../imap-2004/' '--with-mysql=/usr/local/mysql' '--with-mssql'
'--with-pgsql' '--with-gd' '--with-png' '--with-zlib' '--with-jpeg'
'--with-iconv' '--with-gettext' '--with-xml' '--with-mcrypt'
'--enable-mbstring' '--enable-sockets' '--with-bz2' '--enable-calendar'
'--enable-bcmath'
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:
----------------
(This is from http://lv.php.net/manual/en/features.http-auth.php).
I Expected that when i enter username, password and press OK, the code
will output my entered username and password.
Actual result:
--------------
Script keeps asking the username and password indefinitely;
--
Edit bug report at http://bugs.php.net/?id=29132&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29132&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29132&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29132&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29132&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29132&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29132&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29132&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29132&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29132&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29132&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29132&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29132&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29132&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29132&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29132&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29132&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29132&r=float