I'm trying to generate an htaccess and htpasswd file using PHP. The result looks like this:
.htaccess
Code:
AuthName "Test3"
AuthType Digest
AuthDigestFile "/home/httpd/vhosts/mydomain/httpdocs/protected2/.htpasswd"
require valid-user
.htpasswd
Code:
tester:f5d1278e8109edd94e1e4197e04873b9
The username and password for the user in the .htpasswd are both "tester" and the password is encrypted with the PHP md5() function.
When I access the protected directory with Firefox 1.5 or Internet explorer, the same thing happens, I see the login box popup, but the server does not accept tester for the username and tester for the password. Is there something I am doing wrong here?
Thanks in advance.