Re: Authentication

From: Date: Tue, 16 Dec 2003 19:00:45 +0000
Subject: Re: Authentication
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-172828@lists.php.net to get a copy of this message
Robert Sossomon wrote:
I am not trying to authenticate off of a database though. I have scripts that automatically modify the .htaccess file as I change a user, so I need to authenticate off the .htaccess file and store the users information into a cookie. I think from the cookie I can do everything else, just not sure how to get the information from the browser to show me the user of the page. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "I am a quick leaner, dependable, and motivated." -Real live resume statement ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -----Original Message----- From: Chris Shiflett [mailto:shiflett@php.net] Sent: Tuesday, December 16, 2003 11:53 AM To: Robert Sossomon; php-general@lists.php.net Subject: Re: [PHP] Authentication --- Robert Sossomon <robert@gcnorris.com> wrote:
I currently use a .htaccess file for users to login, and now I need to
make some changes to how the site works. I need to be able to have the users login, and once that is done the login needs to be used to pass through the database.
Search PEAR (http://pear.php.net/), because I'm pretty sure there are aome authentication classes that let you use a database to store the access credentials. Hope that helps. Chris ===== Chris Shiflett - http://shiflett.org/ PHP Security Handbook
     Coming mid-2004
HTTP Developer's Handbook
     http://httphandbook.org/
Well, you could use PEAR::Auth to do these things without having to write to a .htaccess file (That's a potential security risk). Then answer to your question is $_SERVER['PHP_AUTH_USER']. That variable will give you the currently logged in user. $_SERVER['PHP_AUTH_PW'] is the password. -- paperCrane <Justin Patrin>

« previous php.general (#172828) next »