note 71117 deleted from features.http-auth by bobby

From: Date: Mon, 13 Nov 2006 16:22:03 +0000
Subject: note 71117 deleted from features.http-auth by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-119683@lists.php.net to get a copy of this message
Note Submitter: David ---- I have problems with a bit of code of my new web. In the authenticate, the server, jump the code of the autentication and only execute de meta (with echo in the code), the server don't read the http headers. The code is this: if(!$_SERVER['PHP_AUTH_USER']) { header('WWW-Authenticate: Basic realm="Sistema de administración ARETECEL'); header('HTTP/1.0 401 Unauthorized'); echo ("<META http-equiv=\"Refresh\" content=\"0; URL=../error.htm\">"); exit; } else { //En el caso de haber proporcionado un usuario y contraseña, la comprobamos //Cargamos las variables introducidas $user=$_SERVER['PHP_AUTH_USER']; $md5_pass=md5($_SERVER['PHP_AUTH_PW']); } It's very simply, I think is a server problem. I try to change cgi.rfc2616_headers of php.ini to 0 and to 1 and the response is the same in both cases. Any idea? Thank you :)

« previous php.notes (#119683) next »