vsailas has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have this problem, I want to create login access and use Mysql to store them.
I want to save the remote "username" as an when a new account is created or an account is updated.
I suppose that to use ENV{REMOTE_USER}, I need to authenticate using .htaccess,
but as I said I have an database based authentication.

Please help me!
Thank you.

Replies are listed 'Best First'.
Re: Get Remote Username
by moritz (Cardinal) on Dec 12, 2007 at 06:36 UTC
    There are several approaches.

    One is to dump the database contents regularly into a .htusers files and let Apache do all the dirty work.

    Another possibility is to send the 401 Autentication Required HTTP header yourself, and deal with the response by yourself.

    Or you can set up your own authentication handler.

Re: Get Remote Username
by Thilosophy (Curate) on Dec 12, 2007 at 06:29 UTC

    Using .htaccess does not necessarily mean a password file. Check out mod_authmysql for making Apache get the passwords from MySQL.