Re: authentication

From: Date: Fri, 08 Dec 2000 06:30:07 +0000
Subject: Re: authentication
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29293@lists.php.net to get a copy of this message
Check your php.ini for output_buffering and turn it on. Tijmen On Thu, 7 Dec 2000, Robert Ludvik wrote: > hi > i've tried this one but it doesn't work. > <?php > function auth() { > Header('WWW-Authenticate: Basic realm="Samo za poobla¹èene"'); > //line 4 > Header('HTTP/1.0 401 Unauthorized'); // line 5 > exit; > } > > if (!isset($PHP_AUTH_USER) && !isset($PHP_AUTH_PW)) { > auth(); > } > else ..... > > but still get an error: Warning: Cannot add header information - headers > already sent by ... on line 4 and 5 > > about the other Re: > >The dbname.inc contains the database name as they are different on > >production and development systems. Watch that you have no empty lines which > >could get sent to the browser ahead of the header. > > what comes in dbname.inc, header.inc and footer.inc??? > tried that one too - nop. > thnx > > -- Customer: I'm running Windows '98 Tech: Yes. Customer: My computer isn't working now. Tech: Yes, you said that.

« previous php.general (#29293) next »