Re: authentication

From: Date: Thu, 07 Dec 2000 23:55:24 +0000
Subject: Re: authentication
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29246@lists.php.net to get a copy of this message
I'd get rid of those funky characters in the realm. Also, be *SURE* that nothing is getting called/done/output before you call auth() function. ----- Original Message ----- From: Robert Ludvik <robert.ludvik@zd-lj.si> Newsgroups: php.general Sent: Thursday, December 07, 2000 12:19 PM Subject: [PHP] authentication > hi > i've tried this one but it doesn't work. > <?php > function auth() { > Header('WWW-Authenticate: Basic realm="Samo za poobla¹èene"'); file://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 > > -- > 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 (#29246) next »