If you use apache and the DBD module for authentication, you need to be very careful with using quotes in your password query.
I had the following configuration:
AuthBasicProvider dbd
AuthDBDUserPWQuery "SELECT password FROM users WHERE name='%s'"
but this yielded the very verbose message: “user user not found”. After a
while a friend commented he used the same query, minus the quotes around
%s
.
So, apparently, the authn_dbd module does the correct quoting for you. Use the following query if you encounter this behaviour:
AuthBasicProvider dbd
AuthDBDUserPWQuery "SELECT password FROM users WHERE name=%s"