note 18618 modified in features.http-auth by vrana
| From: | vrana@php.net | Date: | Tue, 17 Aug 2004 13:56:06 +0000 |
| Subject: | note 18618 modified in features.http-auth by vrana | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-79838@lists.php.net to get a copy of this message | ||
To get it to work with IIS try using this code before setting your "$auth = 0" and the
"if (isset($PHP_AUTH_USER) && isset($PHP_AUTH_PW))"
<?php
//////////////////////////////////////////
if ($PHP_AUTH_USER == "" && $PHP_AUTH_PW == "" &&
ereg("^Basic ", $HTTP_AUTHORIZATION))
{
list($PHP_AUTH_USER, $PHP_AUTH_PW) =
explode(":", base64_decode(substr($HTTP_AUTHORIZATION, 6)));
}
//////////////////////////////////////////
?>
It worked for me on IIS 5 and PHP 4 in ISAPI
--was--
To get it to work with IIS try using this code before setting your "$auth = 0" and the
"if (isset($PHP_AUTH_USER) && isset($PHP_AUTH_PW))"
//////////////////////////////////////////
if ($PHP_AUTH_USER == "" && PHP_AUTH_PW == "" &&
ereg("^Basic ", $HTTP_AUTHORIZATION))
{
list($PHP_AUTH_USER, $PHP_AUTH_PW) =
explode(":", base64_decode(substr($HTTP_AUTHORIZATION, 6)));
}
//////////////////////////////////////////
It worked for me on IIS 5 and PHP 4 in ISAPI
http://php.net/manual/en/features.http-auth.php