Re: Problem with PHP_AUTH_USER

From: Date: Tue, 16 Dec 2003 05:01:32 +0000
Subject: Re: Problem with PHP_AUTH_USER
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-32064@lists.php.net to get a copy of this message
hi, i think $PHP_AUTH_USER will only get unset the next time session_start() is called. try to use a header("location: ...") to direct your logout page to your index page and then print $PHP_AUTH_USER right after session_start().. by right, you should not have any value... i faced the same problem and was puzzled for quite some time, but i think this works.. hth hwee ----- Original Message ----- From: "Constantin Brinzoi" <aurel@irecson.ro> To: <php-db@lists.php.net> Sent: Monday, December 15, 2003 5:16 PM Subject: [PHP-DB] Problem with PHP_AUTH_USER > Hi! > > Here is the problem: > > How can I unset the $PHP_AUTH_USER when the user clicks "logout"? > > The authentication works very well except the log out. > I tried: > session_destroy(); > unset($_SERVER['PHP_AUTH_USER']) > > and in the next line I did: > > print $PHP_AUTH_USER; > > and the value is still there. > > How can I unregister this variable so that the authentication window > appears again. > > I'm using apache 2.0.40, php 4.2.2 compiled as a module, RedHat Linux > 9.0. Register globals is On. > > TIA > Constantin Brinzoi. > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.db (#32064) next »