Re: how to reset PHP_AUTH vars

From: Date: Sat, 03 Apr 2004 10:24:24 +0000
Subject: Re: how to reset PHP_AUTH vars
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-182247@lists.php.net to get a copy of this message
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 (#182247) next »