--- Tommy Jensehaugen <[EMAIL PROTECTED]> wrote:
> I have protected a folder on my apache server with a
> username and password. When I browse to this folder
> I get a popup to type my name and password in(
> automatic popup by internet explorer or something ).
> My question is, how do I log out? I tried to destroy
> the session, but it didn't help.

Probably because there is no session. It sounds like you
are talking about HTTP basic authentication. This form of
authentication requires the browser to authenticate itself
with every single request. Thus, there is no idea of being
"logged in", because this does not require any state
management.

However, browsers will try to be helpful and re-send the
same authentication credentials, so that you don't get
prompted every time for a username and password. This is
what makes it seem as if you are logged in.

Some people do things such as change the realm whenever
they want to make it seem as if the user is logged out. You
will only be able to do this type of thing with PHP (as
opposed to letting your Web server handle it). I think the
user notes on HTTP authentication have many suggestions
that might help you out:

http://www.php.net/manual/en/features.http-auth.php

Chris

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to