RE: [PHP] PHP Authentication wierdness

From: Date: Thu, 10 Aug 2000 14:33:54 +0000
Subject: RE: [PHP] PHP Authentication wierdness
Groups: php.general 
Request: Send a blank email to php-general+get-11141@lists.php.net to get a copy of this message
So noone has a clue? Normally I'd let this drop having not heard anything by now (especially on as heavy traffic a mailing list as this is), but I really need to know as problems we are experiencing relating to authentication could be solved depending on the answer... > I have the following functions: > > function authenticateUser() { > > global $realm; > > Header( "WWW-authenticate: basic realm=\"$realm\"" ); > Header( "HTTP/1.0 401 Unauthorized" ); > > } > > function authorize() { > > if( !$PHP_AUTH_USER ) { > authenticateUser(); > exit; > > } > } > > Now, with the exit there, if I hit the CANCEL button on the > authentication dialogue box, it will prompt me twice more to > enter my authentication information. However, if I change > that "exit;" to a "return $whatever", I will only get prompted > the once and if I hit cancel that's it. > Why? I have no clue and I can't come up with any reasonable > explanation. It's not like there is a recursive function there > telling it to prompt 3 times... I'm at a loss. > Any info would be greatly appreciated!! > > Chris

« previous php.general (#11141) next »