Problem: PHP authentication doesn't protect whole directories, HTTP authentication isn't automated (you always have those inflexible txt files) Solution: Using
this script lets you update your .htpasswd file taking usernames and passwords from a MySQL source Just execute this script everytime a password/username combination is newly
entered or changed. It's maybe not the "perfect" way, but the only way I found to protect whole directories with MySQL data.