#29161 [Opn]: no PHP_AUTH_USER under Apache 1.3.28

From: Date: Wed, 14 Jul 2004 18:39:34 +0000
Subject: #29161 [Opn]: no PHP_AUTH_USER under Apache 1.3.28
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-62276@lists.php.net to get a copy of this message
ID: 29161 User updated by: vahan at arminco dot com Reported By: vahan at arminco dot com Status: Open Bug Type: Unknown/Other Function Operating System: Windows XP SP1 PHP Version: 5.0.0 New Comment: Forgot to add that the same servers were working flawlessly under 4.3.8, downgraded from 5.0 now back to 4.3.8, everything works ok. seems this is a problem with 5.0.0 Previous Comments: ------------------------------------------------------------------------ [2004-07-14 20:34:10] vahan at arminco dot com 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 this bug report at http://bugs.php.net/?id=29161&edit=1

« previous php.bugs (#62276) next »