Yes, I have the filter loaded. PHP file in general work excellent. It's just
any file that uses the following code:
What happens is that the prompt window comes up, but no matter what
username/password is used it always fails. I tried to set the permissions in
IIS several different ways but no luck...
<?
// File name: admin_menu.php
// Check to see if $PHP_AUTH_USER already contains info
if (!isset($PHP_AUTH_USER)) {
// If empty, send header causing dialog box to appear
header('WWW-Authenticate: Basic realm="The Back Care Center Admin Area"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required!';
exit;
} else if (isset($PHP_AUTH_USER)) {
if (($PHP_AUTH_USER !="admin") || ($PHP_AUTH_PW !="tbcc")) {
header('WWW-Authenticate: Basic realm="The Back Care Center Admin
Area"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required!';
exit;
} else {
// Start echo statement
echo "hello";
}
}
----- Original Message -----
From: "Phil Driscoll" <[EMAIL PROTECTED]>
To: "Shane McBride" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Tuesday, February 06, 2001 4:49 AM
Subject: Re: [PHP] I wish: IIS and ISAPI $PHP_AUTH_USER
> >I tried for days to get IIS to authorize a user with $PHP_AUTH_USER and
> never got anywhere, so I used apache and it works fine.
>
> >I wish I just knew why. I loaded PHP as ISAPI, like the manual indicated,
> but no luck.
>
> As well as mapping the .php file extension onto the php4isapi.dll, have
you
> also installed PHP as an ISAPI filter?
> I'm pretty sure that it is the filter bit that enables php to pick up the
> authentication details.
>
> Cheers
> --
> Phil Driscoll
> Dial Solutions
> +44 (0)113 294 5112
> http://www.dialsolutions.com
> http://www.dtonline.org
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]