Apache 2.2, php 5.3
I can log on successfully, but how can I logoff?
in apache config:
<Directory /www/domain.com/adm>
AuthName "MySQL group authenticated zone"
AuthType Basic
AuthMYSQLEnable on
AuthMySQLUser user
AuthMySQLPassword password
AuthMySQLDB dbname
AuthMySQLUserTable users
AuthMySQLNameField email
AuthMySQLPasswordField pass
AuthMySQLGroupField group
AuthMySQLUserCondition " status='on'"
</Directory>
After successfull login, apache sets $_SERVER[PHP_AUTH_USER] but it’s impossible to change/unset this value;
apache_setenv('PHP_AUTH_USER', ''); and session_destroy(); don’t work too;
Header("HTTP/1.0 401 Unauthorized"); doesn’t do anything, at least for my FF12;
If I put another authenticate request with 401:
Header("WWW-Authenticate: Basic realm=\"My Realm\"");
Header("HTTP/1.0 401 Unauthorized");
it produces login form but I just want to redirect user outside of /adm without asking for password again!
I was reading http://www.php.net/features.http-auth for a long time but either I miss something (perhaps very obvious) or it was helpless.
So how can I logoff / logout?
As soon as no glue for three weeks – I just discard the nice idea to use mysql_auth_module and fall back to generic auth.
In case you have any ideas – you are welcome.