fetching REMOTE_USER

J

JrK

Hi,

I want to get the value for users once authenticated by apache with the
digest method in perl.
The directory the webpage belongs to is password protected and requires a
valid user
created with htpasswd2. The webserver is apache2 with mod_perl-1.29

The environment variable REMOTE_USER hasn't any value, so may there are any
other
recommendations on how to identify users easyly with perl ?


TIA,
Jrk.
 
B

Brian Wakem

JrK said:
Hi,

I want to get the value for users once authenticated by apache with the
digest method in perl.
The directory the webpage belongs to is password protected and requires a
valid user
created with htpasswd2. The webserver is apache2 with mod_perl-1.29

The environment variable REMOTE_USER hasn't any value, so may there are
any other
recommendations on how to identify users easyly with perl ?


TIA,
Jrk.


Try

use CGI;
my $query = new CGI;
my $user = $query->remote_user();
 
S

Sherm Pendley

JrK said:
created with htpasswd2. The webserver is apache2 with mod_perl-1.29

The environment variable REMOTE_USER hasn't any value, so may there are
any other recommendations on how to identify users easyly with perl ?

Since you're using mod_perl -

my $user = Apache->request()->connection()->user();

Or, as another posted mentioned, if you're using CGI.pm you could use its
remote_user() method.

sherm--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,527
Members
44,998
Latest member
MarissaEub

Latest Threads

Top