Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Get Remote Username

by vsailas (Beadle)
on Dec 12, 2007 at 04:59 UTC ( #656549=perlquestion: print w/ replies, xml ) Need Help??
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.

Comment on Get Remote Username
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.

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://656549]
Approved by lidden
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (9)
As of 2014-07-11 00:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (217 votes), past polls