RE: [PHP-DB] 'htaccess" method : how to modify passwords from PHP scripts ?

From: Date: Tue, 24 Jul 2001 17:22:13 +0000
Subject: RE: [PHP-DB] 'htaccess" method : how to modify passwords from PHP scripts ?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-10718@lists.php.net to get a copy of this message
There is a fantastic class that takes care of writing .ht* files... look here: http://phpclasses.upperdesign.com/ -----Original Message----- From: Samuel Torton [mailto:samuel@ncslab.com] Sent: Tuesday, July 24, 2001 6:40 AM To: php-db@lists.php.net Subject: [PHP-DB] 'htaccess" method : how to modify passwords from PHP scripts ? Hi all, I use a Linux platform, Apache, and PHP4. I use "htaccess" method in order to have restricted accesses, and I handle my users via a PHP interface. - when I want to create a new user, I generate a string such as "username:cryptedpassword", and I insert it at the end of my ".htpasswd" file. - when I want to modify the password of an existing user, how to do that ? --> 1/ delete the line corresponding to this user, and then insert the new "username:cryptedpassword" line ? in this case, can you tell me which funtions to use (find a line in an ascii file, delete it, and insert the new one) ? --> 2/ run a command line such as "htpasswd ..." (without "-c" argument) ? in this case, can you tell me how to run a unix command line from a PHP script ? Thanks a lot in advance. Regards, -- Samuel Torton NCSLab.com -- 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 (#10718) next »