Re: Logout problem
| From: | Chris Lee | Date: | Tue, 18 Dec 2001 17:19:36 +0000 |
| Subject: | Re: Logout problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78096@lists.php.net to get a copy of this message | ||
Header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
Header("HTTP/1.0 401 Unauthorized");
is the proper http auth hearders, change the realm and you'll have to
re-authenticate.
--
Chris Lee
lee@mediawaveonline.com
"J.F.Kishor" <kishor@ooty.tenet.res.in> wrote in message
news:Pine.LNX.4.10.10112131058210.27192-100000@bulbul.ooty.tenet.res.in...
> hello all,
>
> I have designed a web page using php, as a security measure I have
> kept it password protected. I have used Apache authentication, using
> htpasswd file. Now I want to keep a logout in this web page, I tried to
> send a header request "http/1.0 401 Unauthorized" to force it to
> reauthenticate when the logout link is clicked in the form, but this dose
> not work.
>
> I tried using session_destroy() even that does not work.
>
> To get the authenticated users name I have used GetEnv("REMOTE_USER") in
> all the form and with that username I'am handling mysql and other
requests.
> I don't know where exactly the REMOTE_USER gets stored.
>
> So please help me out in this problem. I want to remove the
> window's authentication cache.
>
> Please give me some ideas and suggestion to remove the user name and make
> the page fresh for the other user to log in.
>
> If possible please send me a sample script.
>
>
>
>
> kishor
> Nilgiri Networks
>
>
>
>
>