PHP databse authentication problemo

From: Date: Sat, 22 Jul 2000 22:43:16 +0000
Subject: PHP databse authentication problemo
Groups: php.db 
Request: Send a blank email to php-db+get-1425@lists.php.net to get a copy of this message
hi people, i am having some problems with php. i have created an encrypted password file (passwrd) on apache server, and i want php to access it each time @ log-in, authenticate user password and proceed to a new php page(- the standard procedure). the script: ------------------------------------------------------------------------------- <html><head></head><body> <input type = "password" name = "pw" size = 10 maxlength = 10> <input type = "submit" name = "pwsubmit" value = "please enter"> <?php echo "Please enter your password here<br>"; if(!isset($PHP_AUTH_USER)) { Header("WWW-Authenticate: Basic realm= \"hjk/webman/servers/apache_1.2.1/passwrd/\""); (LINE 14) Header("HTTP/1.0 401 Unauthorized"); (LINE 15) echo "please try again\n"; exit; } else { echo "Hello $PHP_AUTH_USER.<P>"; echo "You entered $PHP_AUTH_PW as your password.<P>"; } ?> </body></html> ------------------------------------------------------------------------------- OUTPUT:*** Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in /home/webmaster/server/htdocs/trialphp/1.php on line 14 Warning: Cannot add more header information - the header was already sent (header information may be added only before any output is generated from the script - check for text or whitespace outside PHP tags, or calls to functions that output text) in /home/webmaster/server/htdocs/trialphp/1.php on line 15 Please try again ****** however i DO NOT use mysql. i have also tried combinations for encrypted password file path name (LINE 14). doesn't help. i am new to this, any mantras... thanks, harsh (hvp3a@cs.virginia.edu)

« previous php.db (#1425) next »