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 General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to