Tema: Apache Error
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 18/12/2002, 03:33
mickeyzgz
 
Fecha de Ingreso: noviembre-2002
Mensajes: 273
Antigüedad: 21 años, 5 meses
Puntos: 0
Apache Error

Hola a todos,

al poner el siguiente codigo php:

if (!isset($PHP_AUTH_USER)){
header("WWW-Authenticate:Basic realm=\"Entrar en esta página\"");
Header("HTTP/1.0 401 Unauthorized");
echo "Ha cancelado la operación.";
exit;
}else{
$server="localhost";
$id = @mysql_connect($server,$PHP_AUTH_USER,$PHP_AUTH_PW );
if ($id){
echo "CONECTED";
$user=$PHP_AUTH_USER;
$login=1;
}else{
echo "NO CONECTED";
}
}

me da el siguiente internal error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.0.43 Server at localhost Port 80

Y en el error log me dice lo siguiente:

[Wed Dec 18 10:27:59 2002] [error] [client 127.0.0.1] malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: php.exe


Sin embargo he probado con una versión anterior de Apache y funciona. Es un problema de configuración ó es un BUG de esta versión???

Gracias a todos,

/Mickey

Última edición por mickeyzgz; 18/12/2002 a las 03:37