ID: 31370
Updated by: [EMAIL PROTECTED]
Reported By: jaswinder_rana at hotmail dot com
-Status: Open
+Status: Feedback
Bug Type: *General Issues
Operating System: WinXP
PHP Version: 4.3.10
New Comment:
Some questions:
* Do you have safe mode on?
* And are using apache 2 module, filter or CGI?
Previous Comments:
------------------------------------------------------------------------
[2005-01-01 01:13:06] jaswinder_rana at hotmail dot com
Description:
------------
HTTP Authentication is not working. The login box keeps on coming back
and $_SESSION['PHP_AUTH_USER'] and $_SERVER['PHP_AUTH_PW'] are never
intilized. i spent 2 hours on it till i see there were same HTTP
Authentication issue with earlier PHP versions. I even upgraded to
latest fixzes from snaps.php.net and it di't still solve it.
I am using Apache 2.0.44 just in case its server's issue.
There are already issues but i din't see any with PHP4.3.10(and now
after updating from snaps.php.net PHP4.3.11)
so, i figured its good to mention so it can be fixed.
Reproduce code:
---------------
function error ($error_message)
{
echo $error_message."<BR>";
exit;
}
if ( (!isset($_SERVER['PHP_AUTH_USER'])) || $_SERVER['PHP_AUTH_USER']
!='user' || $_SERVER['PHP_AUTH_PW']!='pass')
{
header("WWW-Authenticate: Basic entrer=\"Admin\"");
header("HTTP/1.0 401 Unauthorized");
error("Unauthorized access...");
}
else
{
echo 'You are logged in..';
}
Expected result:
----------------
You are logged in..
Actual result:
--------------
Login box keeps on coming and it says $_SERVER['PHP_AUTH_PW'] undefined
index
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31370&edit=1