ID: 14550
Updated by: jimw
Reported By: [EMAIL PROTECTED]
Status: Open
Old Bug Type: Website problem
Bug Type: *Web Server problem
Operating System: Debian Linux 2.4.12
PHP Version: 4.1.0
New Comment:

fixing type. (website problem is for problems with php.net websites.)

Previous Comments:
------------------------------------------------------------------------

[2001-12-16 15:25:20] [EMAIL PROTECTED]

HTTP: Basic Authentication fails
--------------------------------

PHP: 4.1.0
Server API: Apache (1.3.22)
OS: Linux 2.4.12 (Debian)


The following PHP script should trigger a basic authentication dialog in the client 
browser (see http://www.zend.com/manual/features.http-auth.php):


<?php

if(!isset($PHP_AUTH_USER))
{
    header("WWW-Authenticate: Basic realm=\"MyRealm\"");
    header("HTTP/1.0 401 Unauthorized");
    echo "Text to send if user hits Cancel button\n";
    exit;
}
else
{
      echo "<p>Hello $PHP_AUTH_USER.</p>";
      echo "<p>You entered $PHP_AUTH_PW as your password.</p>";
}

?>

Under PHP 4.0.6. the script worked fine and the user was prompted for username and 
password.

After the upgrade to PHP 4.1.0. the script does not produce the expected results, but 
leads to browser errors on the client side in most cases.

In rare cases the authentication dialog appears and the script works as expected. Most 
of the times the browser reports an error message or shows an empty document:

Netscape 4.77/Linux: "the document contained no data"
Lynx/Linux: "Unexpected network read error; connection aborted."

Netscape 4.7/Win2k: "the document contained no data"
Netscape 3.0/Win2k: "the document contained no data"
IE 6.0/Win2k: "server or dns not found"
Opera 5.01/Win2k: "The server requested a login authentication method that is not 
supported"

Opera 6.0 (Beta TP1) / Linux: shows an empty document

If examined via telnet, the server closes the connection after the URL with the above 
script has been requested, e.g.

telnet (domain name) 80
GET /auth.php HTTP/1.1
Host: (domain name)

-> connection closed by server

16.12.2001

------------------------------------------------------------------------



Edit this bug report at http://bugs.php.net/?id=14550&edit=1


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to