RE: [PHP-WIN] PHP Authentication
| From: | Collins, Robert | Date: | Fri, 22 Feb 2002 14:09:30 +0000 |
| Subject: | RE: [PHP-WIN] PHP Authentication | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-12220@lists.php.net to get a copy of this message | ||
It took some digging on the PHP-Win Archive but I found the answer a long
time ago... You have to be running PHP as an Apache module (not a CGI).
in Apache change :
ScriptAlias /php/ "C:/Program Files/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
to :
LoadModule php4_module "C:/PHP/sapi/php4apache.dll"
AddType application/x-httpd-php .php
then use something like:
<?php
if(!isset($PHP_AUTH_USER)) {
header("WWW-Authenticate: Basic realm='private'");
header("HTTP/1.0 401 Unauthorized");
echo "Authorization Required.";
exit;
}
?>
-----Original Message-----
From: Gehring Uwe [mailto:Uwe.Gehring@tvtravelshop.de]
Sent: Friday, February 22, 2002 1:40 AM
To: php-windows@lists.php.net
Subject: AW: [PHP-WIN] PHP Authentication
I am running php/CGI with IIS on Win2k with Authentification - it is
working.
Uwe
-----Ursprüngliche Nachricht-----
Von: Christoph Grottolo [mailto:christoph.grottolo@gmx.net]
Gesendet: Donnerstag, 21. Februar 2002 20:30
An: php-windows@lists.php.net
Betreff: Re: [PHP-WIN] PHP Authentication
"Rasmus Lerdorf" <rasmus@lerdorf.ca> schrieb im Newsbeitrag
news:Pine.LNX.4.44.0202210942540.1789-100000@christine.ca...
| HTTP Auth does not work with the CGI version of PHP which is what I
| presume you are using on Windows. Switch back to UNIX.
oh, please, dear sysadmin, set up a real good unix server for me -
that's
all you have to do?
rasmus - not everybody has full choice.
Christoph
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php