RE: [PHP] php htpasswd
not sure i follow...you open it with php do whatever you need and close it...its just a text file... -Original Message- From: jtjohnston [mailto:[EMAIL PROTECTED]] Sent: Tuesday, December 18, 2001 1:00 PM To: [EMAIL PROTECTED] Subject: [PHP] php htpasswd I'm sure question has been asked. How can I edit a htpasswd (apache) file using a php script? Does anyone have a piece of code? I would like to see the crypted passwords, but will live without. Thanks, J -- 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] -- 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]
Re: [PHP] php htpasswd
Jack, not sure i follow...you open it with php do whatever you need and close it...its just a text file... It's not just a text file delimited by a colon. You can indeed just type: user:password but it should be: user:crypt(password) When I perled, I knew how to database a text file delimited by : Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my htpasswd.users file. I don't even know if I can? Can I anyone? How would I? -- 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]
Re: [PHP] php htpasswd
? include_once('cookie.egn'); include_once('database.egn'); function bad_passwd() { echo You have entered an invalid password.br\n; exit(); } if ( isset($PHP_AUTH_USER) AND isset($PHP_AUTH_PW) AND $peop_r = fetch_db_value('people_manager', WHERE username = '$PHP_AUTH_USER' AND password = '$PHP_AUTH_PW' ) ) $SessionID = $peop_r['peopleID']; else { Header(WWW-Authenticate: Basic realm='$SERVER_NAME' ); Header(HTTP/1.0 401 Unauthorized); bad_passwd(); } ? http://www.mediawaveonline.com/examples/ -- Chris Lee [EMAIL PROTECTED] Jtjohnston [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Jack, not sure i follow...you open it with php do whatever you need and close it...its just a text file... It's not just a text file delimited by a colon. You can indeed just type: user:password but it should be: user:crypt(password) When I perled, I knew how to database a text file delimited by : Now that I'm saved :) I'm learning MySQL, but I don't want to MySQL my htpasswd.users file. I don't even know if I can? Can I anyone? How would I? -- 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]