Hi,
I'm sure this must be an old issue but a lot of googling has so far not provided the answer.
I have a site which uses a MySQL database user table for user login and authentication. However, I should also like to protect some files using HTTP basic authentication.
Ideally I would have just a single apache user (ie entry in the htpasswd file) and when the user logs on using my php script I also set their apache authentication status at the same time - otherwise they have to log in twice - once to my site and again when they try to access a file in a protected directory.
Problem: assuming the apache user is "auser" with password "abcd" how can I do the login from my php script. It's going to be something to do with setting apache environment variables and/or cookies I guess but can someone provide me the details?
Thanks,
Dave