Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: CGI Page and REMOTE_USER environment variable

by roboticus (Canon)
on Nov 09, 2012 at 12:03 UTC ( #1003108=note: print w/ replies, xml ) Need Help??


in reply to CGI Page and REMOTE_USER environment variable

I don't do any CGI or WWW stuff in perl, but a brief review of the CGI docs indicates that you can use the remote_user() method to get the remote user's name. As I see it, you're trying to access the environment variable REMOTE_USER on the server.

Also, the log shows a basic authentication problem, so you may be having trouble a bit before your code gets a chance to do much. I think I'd track down one of the CGI tutorials, or investigate one of the newer perl WWW frameworks that people are talking about.

...roboticus

When your only tool is a hammer, all problems look like your thumb.


Comment on Re: CGI Page and REMOTE_USER environment variable
Download Code
Re^2: CGI Page and REMOTE_USER environment variable
by Anonymous Monk on Nov 09, 2012 at 12:20 UTC
    my $q = CGI->new(); #my $UserID = $ENV{"REMOTE_USER"}; my $UserID = $q->remote_user(); print $q->header(); if($UserID){ print "User:<b>$UserID</b>"; }
    I get nothing in the page and the same error in the logs.

      It works for me (with shebang) on IE and Firefox.

      Smells like Apache2-AuthenNTLM

      «The Crux of the Biscuit is the Apostrophe»

        This is the module apache is using. Are you using this? If not can I get this to work without using this?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2014-07-29 00:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls