From: [EMAIL PROTECTED]
Operating system: Redhat Linux 7.1 kernel 2.4.2-2
PHP version: 4.3.0-pre2
PHP Bug Type: Apache related
Bug description: PHP_AUTH_USER isn't set
I've upgraded PHP 4.2.3 to the beta 4.3.0-pre2 and I've set register
globals on in php.ini.
My Apache version is 1.3.24.
PHP configure:
./configure --with-apxs=/usr/local/apache/bin/apxs
--with-mysql=/usr/local/mysql --enable-ftp --with-openssl
The script is using this .htaccess-file
AuthType Basic
AuthName 'Urenregistratie'
AuthUserFile /htpasswd/urenreg
require valid-user
I am sure that Apache is setting the PHP_AUTH_USER because the following
script gives the correct output:
// begin dirty hack
$headers = apache_request_headers();
foreach ($headers as $header => $value) {
if ($header == "Authorization")
{
$value = str_replace(" ", "", $value);
$value = str_replace("Basic", "", $value);
$userArray = explode(":", base64_decode($value));
$PHP_AUTH_USER = $userArray[0];
}
}
echo $PHP_AUTH_USER;
// end dirty hack
If I echo $PHP_AUTH_USER or $_SERVER["PHP_AUTH_USER"] above this script I
am getting a empty result.
Note: the script was functioning 100% properly with php 4.2.3
--
Edit bug report at http://bugs.php.net/?id=20441&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=20441&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=20441&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=20441&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=20441&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=20441&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=20441&r=support
Expected behavior: http://bugs.php.net/fix.php?id=20441&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=20441&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=20441&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=20441&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20441&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=20441&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=20441&r=isapi