RE: [PHP-DB] & [PHP] .htpasswd?

From: Date: Mon, 05 Feb 2001 05:07:24 +0000
Subject: RE: [PHP-DB] & [PHP] .htpasswd?
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-db+get-6385@lists.php.net to get a copy of this message
Hi, you might want to take a look at this one: http://www.thewebmasters.net/php/Htpasswd.phtml Works in both php3 and php4. Give you functions for adding/deleting/listing/renaming users + much more, in standard .htpaccess password files. I use it myself on several sites, it works great. - t.a.madland - ------------------------------- original message ---------------------------------- From: Cody Caughlan [mailto:codyc@cisco.com] Sent: 5. februar 2001 04:53 To: Victor Foitzik; php-db Subject: Re: [PHP-DB] .htpasswd? You could also run something like: system("htpasswd -b passwordilf $user $password"),,,basically get the shell to run a the htpasswd program supplied by apache. you might have to play around with the permissions to do this, so the webserver can execute the htpasswd binary. /cody caughlan Victor Foitzik wrote: > James Smith wrote: > > >Is there a way that when a user signs up for a > >user/pass on a site, to automatically update the > >.htpasswd on the site? Right now I'm running a Win2k > >Pro, with Apache installed and MySQL/PHP. > > > >Thanks, > > > >James > > The quite simpliest method is to put appropriate directives in a .htaccess > file in appropriate (e.g. to be protected) directories like this: > > AuthName "Restricted Area" > AuthUserFile /www/users/users > AuthGroupFile /www/users/groups > AuthType Basic > Require registeredusers > > Then all you have to do is to regenerate the user and the group file > according to your needs. > > Another way to do this directly with MySQL is to use the apache auth_mysql > module which allows you to store authentication data in a MySQL DB. See > http://mysql.com/downloads/contrib.html > and > http://httpd.apache.org/docs/misc/FAQ-G.html > for more info. > > HTH > Victor > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#6385) next »