|   Mailinglisten-Archive | 
This is a multi-part message in MIME format.
------=_NextPart_000_0011_01C02C92.DBE773C0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Tach beisammen!
ich habe folgendes Test-Script:
<?php
  if(!isset($PHP_AUTH_USER))
  {
    Header("WWW-Authenticate: Basic realm=3D\"My Realm\"");
    Header("HTTP/1.0 401 Unauthorized");
    echo "Text to send if user hits Cancel button\n";
    exit;
  }
  else
  {
    echo "Hello $PHP_AUTH_USER.<P>";
    echo "You entered $PHP_AUTH_PW as your password.<P>";
  }
?>
Ich m=F6chte einen passwortgesch=FCtzten Bereich in meine Webseite =
einbinden. Nur funktioniert obiges Script bei mir auf meinem webserver =
nicht.
Der Webserver l=E4uft mit dem OS W2k + Apache 1.3.12 + PHP4. Folgende =
Fehlermeldung meldet der Webserver beim Aufruf des Scripts:
{
Internal Server Error
The server encountered an internal error or misconfiguration and was =
unable to complete your request.=20
Please contact the server administrator, webmaster_(at)_netzwerkverein.com =
and inform them of the time the error occurred, and anything you might =
have done that may have caused the error.=20
More information about this error may be available in the server error =
log.=20
-------------------------------------------------------------------------=
-------
Apache/1.3.12 Server at localhost Port 80
}
in der errors.log steht folgendes:
[Mon Oct 02 16:51:11 2000] [error] [client 192.168.0.5] malformed header =
from script. Bad header=3DHTTP/1.0  401  Unauthorized: c:/php/php.exe
Folgendes habe ich in einem Tutorial gelesen:
Die HTTP-Authentifizierung durch PHP ist nur verf=FCgbar, wenn PHP als =
Apache-Modul l=E4uft und funktioniert daher nicht mit der CGI-Version.=20
So, nun meine Frage:
kann mir jemand sagen, ob ich die Authentifizierung unter W2k nutzen =
kann, und wie funktioniert das? bzw. warum funktioniert es nicht??
OmniHttp hatte ich auch mal testweise eingerichtet...da kam der =
Benutzer/Passwortdialog, nur dass, als ich was eingab der Dialog drei =
mal hintereinander erschien, ohne mit dem Script fortzufahren =
(=3D>ausgabe der eingegebenen daten). k.A.
W=E4re wirklich super spitze, wenn mir jemand helfen k=F6nnte!!!
Vielen Dank schon mal.
Ciao
  Alexander
------=_NextPart_000_0011_01C02C92.DBE773C0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana>Tach beisammen!</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>ich habe folgendes =
Test-Script:</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><?php<BR> =20
if(!isset($PHP_AUTH_USER))<BR>  {<BR>   =20
Header("WWW-Authenticate: Basic realm=3D\"My =
Realm\"");<BR>   =20
Header("HTTP/1.0 401 Unauthorized");<BR>    echo "Text to =
send if=20
user hits Cancel button\n";<BR>    exit;<BR>  =
}<BR> =20
else<BR>  {<BR>    echo "Hello=20
$PHP_AUTH_USER.<P>";<BR>    echo "You entered =
$PHP_AUTH_PW=20
as your password.<P>";<BR>  }<BR>?></FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Ich m=F6chte einen =
passwortgesch=FCtzten Bereich in=20
meine Webseite einbinden. Nur funktioniert obiges Script bei mir auf =
meinem=20
webserver nicht.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Der Webserver l=E4uft mit dem OS W2k =
+ Apache=20
1.3.12 + PHP4. Folgende Fehlermeldung meldet der Webserver beim Aufruf =
des=20
Scripts:</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>{<BR></FONT><STRONG>Internal Server=20
Error</STRONG></DIV>
<DIV>The server encountered an internal error or misconfiguration and =
was unable=20
to complete your request. </DIV>
<P>Please contact the server administrator, webmaster_(at)_netzwerkverein.com =
and=20
inform them of the time the error occurred, and anything you might have =
done=20
that may have caused the error.=20
<P>More information about this error may be available in the server =
error log.=20
<P>
<HR>
<ADDRESS>Apache/1.3.12 Server at localhost Port 80</ADDRESS>
<DIV><FONT face=3DVerdana size=3D2>}</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>in der errors.log steht =
folgendes:</FONT></DIV>
<DIV>[Mon Oct 02 16:51:11 2000] [error] [client 192.168.0.5] malformed =
header=20
from script. Bad header=3DHTTP/1.0  401  Unauthorized:=20
c:/php/php.exe</DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Folgendes habe ich in einem Tutorial=20
gelesen:</FONT></DIV>
<DIV>Die HTTP-Authentifizierung durch PHP ist nur verf=FCgbar, wenn PHP =
als=20
Apache-Modul l=E4uft und funktioniert daher nicht mit der CGI-Version. =
</DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><STRONG><FONT face=3DVerdana size=3D2>So, nun meine=20
Frage:</FONT></STRONG></DIV>
<DIV><FONT face=3DVerdana size=3D2>kann mir jemand sagen, ob ich die=20
Authentifizierung unter W2k nutzen kann, und wie funktioniert das? bzw. =
warum=20
funktioniert es nicht??</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>OmniHttp hatte ich auch mal testweise =
eingerichtet...da kam der Benutzer/Passwortdialog, nur dass, als ich was =
eingab=20
der Dialog drei mal hintereinander erschien, ohne mit dem Script =
fortzufahren=20
(=3D>ausgabe der eingegebenen daten). k.A.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>W=E4re wirklich super spitze, wenn =
mir jemand=20
helfen k=F6nnte!!!</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Vielen Dank schon mal.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT> </DIV>
<DIV><FONT face=3DVerdana size=3D2>Ciao</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>  =
Alexander</FONT></DIV></BODY></HTML>
------=_NextPart_000_0011_01C02C92.DBE773C0--
    php::bar PHP Wiki - Listenarchive