Re: header error?

From: Date: Tue, 08 Aug 2000 15:12:13 +0000
Subject: Re: header error?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-10692@lists.php.net to get a copy of this message
this is what i do, works good if (!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm=\"$DIFF\""); Header("HTTP/1.0 401 Unauthorized"); include_once "$IncludeDir/Header.inc"; Error("You clicked cancel"); exit; } else { echo "your username is $PHP_AUTH_USER and your pass is $PHP_AUTH_PW"; exit; } good luck On 8 Aug 2000, deryk wrote: > HI: > I met a problem like this: > at the start of my php file,I add two line: > Header("WWW-Authenticate: Basic realm=\"Member\""); > Header("HTTP/1.0 401 Unauthorized"); > just to make it be authorizable. > but when I open that file NO authorize box > just a internal server error.while I check the log > It said:malformed header from script. Bad header=HTTP/1.0 401 Unauthorized: > e:/php401/php.exe > > anyone can help me? > I'm using w2kpro+apache1.3.12+php4.0.1pl2 > thanx > > deryk > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#10692) next »