Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

undefined subroutine in a popular perl Module 1

Status
Not open for further replies.

IVJP

Programmer
Jul 21, 2014
11
0
0
US
Hello Tek Tippers,

I cannot get my head around why I am getting this error, when trying to access my website.

Undefined subroutine &LWP::Authen::Ntlm::ntlm_domain called at /tmp/perl/LWP/Authen/NTLM.pm line 36.

I am using NTLM v.5 and tried to upgrade to v.6 and even downgrade to v.1, only to get the same error.

Any idea?

Thanks!

package LWP::Authen::Ntlm;

use strict;
use vars qw/$VERSION/;

$VERSION = '5.827';

use Authen::NTLM "1.02";
use MIME::Base64 "2.12";


use vars qw($VERSION @ISA @EXPORT);
require Exporter;



sub authenticate {
my($class, $ua, $proxy, $auth_param, $response,
$request, $arg, $size) = @_;

my($user, $pass) = $ua->get_basic_credentials($auth_param->{realm},
$request->uri, $proxy);

unless(defined $user and defined $pass) {
return $response;
}

if (!$ua->conn_cache()) {
warn "The keep_alive option must be enabled for NTLM authentication to work. NTLM authentication aborted.\n";
return $response;
}
my($domain, $username) = split(/\\/, $user);

print "$domain,$username\n";

[highlight #FCE94F] ntlm_domain($domain);
ntlm_user($username);
ntlm_password($pass);[/highlight]

my $auth_header = $proxy ? "Proxy-Authorization" : "Authorization";
 
I needed to have Authen::NTLM module installed. Authen::Ntlm and Authen::NTLM are different modules. Ntlm requires NTLM. Works now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top