As was reported in issue 0004000, $_SERVER["PHP_AUTH_USER"] does not appear to be populated during use of HTTP Basic Authentication.
The example code from php.net http://php.net/manual/en/features.http-auth.php does not work. The user is continually prompted for a username/password (i.e. the condition that isset($_SERVER["PHP_AUTH_USER"]) is never passed).
According to Caucho's Bugtracker :