Dave,
That script example was actually taken from the HTTP Authentication example in the manual, or if it wasn't... the same example exists in the manual. I use the same code in various locations on my development box (Win2K Pro, Apache 1.3.20, PHP 4.0.6) with no problems. I think the problem actually lies with the mode of PHP installation.
AlCapone, are you running PHP as an Apache module or in CGI? On Win32 Apache, PHP must be run as a module for HTTP Authentication to work. md_proxy doesn't really have anything to do with PHP sending headers, at least not in the way you're talking about. mos_proxy is not loaded on my dev box, and HTTP AUTH works just fine. HTH.
Geoff A. Virgo