On 3/13/06 7:59 AM, "Carla Wilbert" <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I must login to access a website on an Apache webserver because the access
> to the site is restricted with .htaccess file. So a window with username and
> password request pop up.
>
> For my program I need also the login information to logon to an DB server.
>
> I use remote_user() to get the username:
> my $query = new CGI;
> my $admin = $query->remote_user();
>
> Now I need the plain text password.
>
> Could I get this from the "old" Apache login like the name (remote_user() )
> or do I need a new login window?
Carla,
Unfortunately, you cannot get the password supplied with basic
authentication from CGI. Only the username is supplied. You could set up a
CGI-based authentication system that ran instead of the basic auth
mechanism. Alternatively, if you use mod_perl, you do have access to the
user-supplied password. If you haven't used mod_perl before, I would
probably start with a simple CGI-based login system. There are multiple
online tutorials for how to do this.
Sean
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>