Foros del Web » Programando para Internet » PHP »

Problema Con Autenticacion $php_auth_user

Estas en el tema de Problema Con Autenticacion $php_auth_user en el foro de PHP en Foros del Web. BUENAS A TODOS AMIGOS MI PROBLEMA ES QUE CUANDO PONGO: if (!isset($PHP_AUTH_USER)) { header('WWW-Authenticate: Basic realm="Acceso restringido"'); header('HTTP/1.0 401 Unauthorized'); echo 'Authorization Required.'; exit; } ...
  #1 (permalink)  
Antiguo 13/07/2008, 09:35
 
Fecha de Ingreso: julio-2008
Mensajes: 208
Antigüedad: 15 años, 10 meses
Puntos: 5
Problema Con Autenticacion $php_auth_user

BUENAS A TODOS AMIGOS MI PROBLEMA ES QUE CUANDO PONGO:

if (!isset($PHP_AUTH_USER)) {
header('WWW-Authenticate: Basic realm="Acceso restringido"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}

PARA QUE ME APAREZCA PARA PONER USUARIO Y CONTRASEÑA NUNCA SE PUEDE CONECTAR, ME PARECE QUE PORQUE NO TENGO NADA EN LA MATRIZ $PHP_AUTH_USER ES DECIR NUNCA ME LOGUEO, Y QUIERO SABER COMO HACERLO PARA ASI PONER CONTRASEÑAS EN MIS PAGINAS DE ACUERDO A SI UN VISITANTE TIENE PERMISO O NO.
POR LAS DUDAS ESTOY USANDO EL MODULO APACHE...
MUCHAS GRACIAS A LOS QUE ME PUEDAN DAR UNA PISTA....
SALUDOS...
  #2 (permalink)  
Antiguo 20/10/2008, 08:43
 
Fecha de Ingreso: julio-2008
Mensajes: 208
Antigüedad: 15 años, 10 meses
Puntos: 5
Respuesta: Problema Con Autenticacion $php_auth_user

RESPONDO PARA VER SI SALE A FLOTE DE NUEVO EL MENSAJE.
GRACIAS.
  #3 (permalink)  
Antiguo 20/10/2008, 09:21
Avatar de GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 18 años
Puntos: 2135
Respuesta: Problema Con Autenticacion $php_auth_user

Hola sandinosaso,

Prueba utilizar $_SERVER['PHP_AUTH_USER'].

Saludos.
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:48.