Re: HTTP Authentication with PHP
| From: | Chris Lee | Date: | Thu, 17 May 2001 13:06:06 +0000 |
| Subject: | Re: HTTP Authentication with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-53245@lists.php.net to get a copy of this message | ||
this seems to make my browsers not cache.
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
then add
header("WWW-Authenticate: Basic realm='$SERVER_NAME' ");
header("HTTP/1.0 401 Unauthorized");
to pop up a login box.
--
Chris Lee
lee@mediawaveonline.com
""Chris"" <candrew@oxspring.com> wrote in message news:9e06jc$jel$1@toye.p.sourceforge.net...
I have configured mod_auth_pam for Apache and secured a directory with an
.htaccess file:
AuthType Basic
AuthName "Secure Area"
require group staff
require user chris
Now, I would like to control the local browser window's authentication cache
via PHP. For example, how do I clear the cache of a browser window thereby
forcing the user to log back in? I have tried:
Header( "WWW-authenticate: basic realm="Secure Area");
Header( "HTTP/1.0 401 Unauthorized");
but this isn't clearing the cache.
Regards,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net