[thelist] PHP_AUTH_USER

Andrew andrew at humanbehaviour.co.uk
Mon Mar 3 11:33:01 CST 2003

>whats the way around this being disabled on the server $PHP_AUTH_USER

juat to add to this: this is waht i received from my host:

Are you using the $PHP_AUTH_USER variable in your code? if so this is
unsupported by our servers, this is often the case with this kind of
error so you would need to change to basic HTTP auth or cookies.

The code is:

function do_auth($user, $pass) {
		if(!isset($user)) {
			header("WWW-Authenticate: Basic realm=\"".$this->config('authname')."\"");
			echo "Bad Username/Password.\n";
		} else {
			if(!($user == $this->config('user') and $pass == $this->config('pass'))) {
				 Header("WWW-Authenticate: Basic realm=\"".$this->config('authname')."\"");
				 echo "Bad Username/Password.";

		return $this->authed = true;

and the function is:

$pla->do_auth($PHP_AUTH_USER, $PHP_AUTH_PW);

Thank you


More information about the thelist mailing list