Re: IIS and PHP authorization

From: Date: Sun, 28 Jan 2001 08:51:54 +0000
Subject: Re: IIS and PHP authorization
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-37096@lists.php.net to get a copy of this message
I thought PHP would only run as CGI on IIS? Right now I'm trying to config Apache. ----- Original Message ----- From: "Rasmus Lerdorf" <rasmus@php.net> To: "Shane McBride" <php@rditech.net> Cc: <php-general@lists.php.net> Sent: Saturday, January 27, 2001 9:44 PM Subject: Re: [PHP] IIS and PHP authorization > If you are using the CGI version of PHP then this won't work. You can't > do HTTP auth from the CGI version. > > -Rasmus > > On Sun, 28 Jan 2001, Shane McBride wrote: > > > I finally got PHP, MySQL and Win2k installed after a long hard battle with a Promise Ultra/66 controller card. Now, PHP seems to work fine exceot when I have a script that requires authorization, I never get the popup box to input the login and password. Here's the script: > > > > <? > > // Include the setup password file > > require 'setup.inc'; > > > > // 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 Merchant Power Setup Area"'); > > header('HTTP/1.0 401 Unauthorized'); > > echo 'Authorization Required!'; > > exit; > > } else if (isset($PHP_AUTH_USER)) { > > if (($PHP_AUTH_USER !=$SETUP_USER) || ($PHP_AUTH_PW !=$SETUP_PASS)) { > > header('WWW-Authenticate: Basic realm="The Merchant Power Setup Area"'); > > header('HTTP/1.0 401 Unauthorized'); > > echo 'Authorization Required!'; > > exit; > > } > > } > > ?> > > > > Any ideas? > > > > TIA- Shane > > > > > -- > 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 (#37096) next »