PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
hi guys, id like to kill a session authorized by mod_auth.
ive tried to unset($_SESSION), without success
i dont wanna close the browser, i just wanna the user re-confirm his password if he wants continue into the members' area.
thanks.
You should know that mod_auth doesn't have anything to do with PHP sessions. Try unset the PHP_AUTH_USER and PHP_AUTH_PW variables, first, and watch what will happen.
I've told something, that I shouldn't. Here's some extract from manual, to which I gave you this link.
Apache Manual FAQ wrote:How do I log out?
Since browsers first started implementing basic authentication, website administrators have wanted to know how to let the user log out. Since the browser caches the username and password with the authentication realm, as described earlier in this tutorial, this is not a function of the server configuration, but is a question of getting the browser to forget the credential information, so that the next time the resource is requested, the username and password must be supplied again. There are numerous situations in which this is desirable, such as when using a browser in a public location, and not wishing to leave the browser logged in, so that the next person can get into your bank account.
However, although this is perhaps the most frequently asked question about basic authentication, thus far none of the major browser manufacturers have seen this as being a desirable feature to put into their products.
Consequently, the answer to this question is, you can't. Sorry.
Hmm, By writing those links, I just gave you an alternative to mod_auth. There's no other option to authorize web-page user than mod_auth (mod_digest) OR sessions OR cookies when you are using Apache and PHP. So if you are saying that you read those, i think that now it should be simple to write your own simple(for begining) system. On this forum there are plenty of examples of doing it.