Re: htaccess and $PHP_AUTH_USER

From: Date: Tue, 28 Aug 2001 22:56:28 +0000
Subject: Re: htaccess and $PHP_AUTH_USER
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-64919@lists.php.net to get a copy of this message
Hi, There is a few scripts on Zend pages. I'm sure, this one of them will be very helpful: http://www.zend.com/zend/tut/authentication.php ----- Original Message ----- From: Rene Fournier <rene.fournier@markada.com> To: <php-general@lists.php.net> Sent: Tuesday, August 28, 2001 9:24 PM Subject: [PHP] htaccess and $PHP_AUTH_USER > Please, someone, help me... > > What I want to do: Have a user prompted for an ID/password, both of which > (if valid), get passed to a PHP script, which then uses the ID/password to > selectively display certain fields of a table. (For example, if the user > logs in as "Sales", he would only see the sales-related fields of the > tables. Whereas, if the user logs in as "Production", she would see the > production-related fields. Pretty simple.) > > I've read the PHP docs on $PHP_AUTH_USER. One stupid question: Must I use > the htaccess directory-protection feature of Apache in order for this to > work (or is$PHP_AUTH_USER not dependent on Apache (or any web server) at > all)? I mean, from reading the docs, it seems as if the value stored in > $PHP_AUTH_USER comes what the user types into the Apache-spawned dialog box > (when the user types the URL containing that password-protected > directory.)?? The thing is, when I turn password protection on for the > directory in question, and add the users and passwords to the htaccess file, > then go to the URL in the browser, I get prompted several times for a user > and password--first, it seems, by Apache, then by the PHP code I copied from > the docs. > > If anyone can help, I'd greatly appreciate it. Best would be some real code > running in a similar server environment. (The site in question is running > on www.fatcow.com servers--they're running PHP3 (shouldn't matter, right) > and Apache.) > > MUCH thanks in advance... > > ...Rene > > --- > Rene Fournier, > PLEASErenefournierNO@yahooSPAM.com > > > -- > 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 (#64919) next »