realm is missing in HTTP authnetication

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Shai Halevi

    realm is missing in HTTP authnetication

    I'm running the following script under PHP 4.4.2 in safe-mode:

    <?php
    header('WWW-Authenticate: Basic realm="some realm"');
    header("HTTP/1.0 401 Unauthorized");
    exit('The realm is supposed to be "some realm"');
    ?>

    When accessing it, I get the following headers from the server:

    RESPONSE: HTTP/1.1 401 Authorization Required
    Date: Fri, 21 Jul 2006 13:23:15 GMT
    Server: Apache/1.3.xx (Unix) PHP/4.4.2 mod_ssl/2.8.yy
    OpenSSL/0.9.7zzzz
    X-Powered-By: PHP/4.4.2
    WWW-Authenticate: Basic realm="1125"
    [...]

    The "1125" is probably the script UID, but this should have been added
    to "some realm", not replaced it. Can anyone shed any light on this? Is
    this a bug in my PHP engine?

    Some details from phpinfo() are attached below.

    System =FreeBSD my.web.address. org 5.2.1-RELEASE-p10 FreeBSD
    5.2.1-RELEASE-p10 #1: Thu Sep 23 15:05:06 MDT 2004
    cheeks@my.web.a ddress.com:/some/path/here i386

    Configure Command ='./configure' '--enable-versioning'
    '--enable-memory-limit' '--with-layout=GNU'
    '--with-config-file-scan-dir=/path/to/somewhere' '--disable-all'
    '--with-regex=php' '--with-apxs=/path/to/apxs' '--prefix=/some/prefix'
    'i386-portbld-freebsd5.2.1'

    Server API =Apache
    Virtual Directory Support =disabled
    PHP API =20020918
    PHP Extension =20020429
    Zend Extension =20050606
    Debug Build =no
    Zend Memory Manager =enabled

    -- Shai

Working...