Re: how to reset PHP_AUTH vars

From: Date: Sat, 03 Apr 2004 10:35:13 +0000
Subject: Re: how to reset PHP_AUTH vars
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-182249@lists.php.net to get a copy of this message
Hello, Thanks for your reply. but what I'm looking for is, yes logoff the user, but not making him/her click some link. I've this page and I want it to ask for username & password whenever a user comes/comes back. Any suggestions? Thanks anyway Nitin ----- Original Message ----- From: "Marek Kilimajer" <kilimajer@webglobe.sk> To: "Nitin Mehta" <nitinmehta@kappa.net.in> Cc: "PHP List" <php-general@lists.php.net> Sent: Saturday, April 03, 2004 3:54 PM Subject: Re: [PHP] how to reset PHP_AUTH vars > Nitin Mehta wrote: > > Hello all, > > > > I'm facing this problem and tried many solutions with no success. How do I reset the value of PHP_AUTH_USER and PW. > > > > I've tried session_destroy(), but as I'm not starting any session at all, it's not worth. > > > > I've tried using random value to include in header. > > > > Now what should I do? > > > > Thanx in adv for any suggestion/help > > Nitin > > Are you trying to logoff a user using http autheniation? Provide a > logoff link in this form: > > <a > href="http://nonexistentuser:dumypassword@www.domain.net">Logoff</a> > > This sets the login credentials in the browser to nonexisting user, so > your code will return 401 response and the browser will ask the user for > username and password again. > > I'm not sure if this method works in IE with the latest security patch > installed. These should ignore username and password in links. >

« previous php.general (#182249) next »