Re: I wish: IIS and ISAPI $PHP_AUTH_USER

From: Date: Tue, 06 Feb 2001 14:52:40 +0000
Subject: Re: I wish: IIS and ISAPI $PHP_AUTH_USER
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-38388@lists.php.net to get a copy of this message
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" <phil@dialsolutions.co.uk> To: "Shane McBride" <php@riversidedesigns.net>; <php-general@lists.php.net> 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: 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

« previous php.general (#38388) next »