Can anybody tell me the simplest way (or suggest me a tutorial) to save / update / delete usernames and passwords in a .htpasswd
file using php?? I am using php5 and Apache 2 in Windows.
Asked
Active
Viewed 2.7k times
11
-
Exact duplicate: http://stackoverflow.com/questions/39916/programmaticly-building-htpasswd – Treffynnon Apr 20 '11 at 15:27
-
not exact duplicate. look my specific title. – Alfred Apr 20 '11 at 15:29
-
I don't see the distinction. The link I have provided shows you how to administer a .htpasswd file with PHP. – Treffynnon Apr 20 '11 at 15:31
3 Answers
1
To remove a user: Just open the password file using nano or vim and simply remove the user line that you want to delete...

Junaid
- 4,682
- 1
- 34
- 40
0
You can use the htpasswd tool. I don't think it can remove the password, but save and update should be ok.
EDIT BTW: I'm not sure of the available operating systems.

M'vy
- 5,696
- 2
- 30
- 43
-
He is on windows according to the question title. I could be wrong but I don't think htpasswd is available for Windows. Perhaps in Cygwin. – Treffynnon Apr 20 '11 at 15:32