realm is missing in HTTP authnetication

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

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

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
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 5.2.1-RELEASE-p10 FreeBSD
5.2.1-RELEASE-p10 #1: Thu Sep 23 15:05:06 MDT 2004 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'

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

-- Shai

Site Timeline