|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #29129 PHP_AUTH_USER does not seem to be passing thru
Submitted: 2004-07-14 01:56 UTC Modified: 2004-07-14 12:57 UTC
Avg. Score:5.0 ± 0.0
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:0 (0.0%)
From: sethw at webglimmer dot com Assigned:
Status: Closed Package: *General Issues
PHP Version: 5.0.0 OS: Linux RH ES 3.0
Private report: No CVE-ID: None
 [2004-07-14 01:56 UTC] sethw at webglimmer dot com
So a dump of $_SERVER reveals that after a

 header( 'WWW-Authenticate: Basic realm="WG Content-Management"' ); 


that $_SERVER['PHP_AUTH_PW'] is set but not $_SERVER['PHP_AUTH_USER'] 

Any ideas?

Reproduce code:
if (isset( $_SERVER['PHP_AUTH_USER'] ) && isset($_SERVER['PHP_AUTH_PW'])) {
// code 


// always returns false regardless of what is entered

Expected result:
should return true if the "Authentication Box" is filled in


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-14 10:42 UTC] alex dot pagnoni at solarix dot it
Same bug as #29132.
 [2004-07-14 12:52 UTC] nospam0 at malkusch dot de
In fact it is set, but it's NULL (use array_key_exists() 
instead of isset()). I have the same problem with PHP5 
final. CVS from 8th Juli works fine.
 [2004-07-14 12:57 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

Try next CVS snapshot, please.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Aug 15 18:01:26 2020 UTC