You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Gustavo Schroeder <gu...@gmail.com> on 2007/06/04 15:34:27 UTC

Failed to resolve handler

Hi,

I'm using apache-2.0 + mod_perl-2.0.3
Trying to make my users authenticated against a NIS domain, to do so I
installed Authen::Simple::NIS, Net::NIS, Net::NIS::Table
Added the following config to httpd.conf
----------------------
PerlModule Authen::Simple::NIS
<Location /test>
  AuthType Basic
  AuthName "Authentication required"
  PerlAuthenHandler Authen::Simple::NIS
  PerlSetVar AuthenSimpleNIS_domain "NIS-lab"
  Require valid-user
</Location>
--------------------------
apachectl -t returns OK
once apache is restarted and I try to access the url /test I get:

"failed to resolve handler Authen::Simple::NIS"

Any clue where I'm missing?
thanks

RE: Failed to resolve handler

Posted by "Peter, Attila" <at...@eds.com>.
 Gustavo,

Since the default handler subroutine is called handle
the Authen::Simple::NIS package should have such a sub.

But this does not have such a sub. Check the usage of
Authen::Simple::NIS. You have to load
Authen::Simple::Apache as well. This is the one that
provides you the mod perl handler (for both mp1 and mp2)

So this should be your startup.pl:

#!/usr/bin/env /usr/local/bin/perl
use strict;
use warnings;
Authen::Simple::Apache;
use Authen::Simple::NIS;

1;

--Attila

-----Original Message-----
From: Gustavo Schroeder [mailto:gutosch@gmail.com] 
Sent: Montag, 4. Juni 2007 18:49
To: Perrin Harkins; modperl@perl.apache.org
Subject: Re: Failed to resolve handler

httpd.conf config

PerlRequire /usr/local/apache2/conf/startup.pl
<Location /test>
  DAV svn
  SVNPath /export/svn/
  AuthType Basic
  AuthName "Authentication required"
  PerlAuthenHandler Authen::Simple::NIS
  PerlSetVar AuthenSimpleNIS_domain "boss-lab"
  Require valid-user
</Location>

startup.pl content

#!/usr/bin/env /usr/local/bin/perl
use strict;
use warnings;
use Authen::Simple::NIS;
1;

Apache2 restarts gracefully, but it's appending the same error in the
log files trying to hit url test [Mon Jun 04 09:39:13 2007] [notice]
Apache configured -- resuming normal operations failed to resolve
handler Authen::Simple::NIS sorry, I cant find any other kind of error
in apache's log files.
any clue where I'm missing?

On 6/4/07, Perrin Harkins <pe...@elem.com> wrote:
> On 6/4/07, Gustavo Schroeder <gu...@gmail.com> wrote:
> > [Mon Jun 04 08:17:06 2007] [error] Authen::Simple::NIS version 1 
> > required--this is only version 0.3 at 
> > /usr/local/apache2/conf/startup.pl line 4.\nBEGIN 
> > failed--compilation aborted at /usr/local/apache2/conf/startup.pl 
> > line 4.\nCompilation failed in require at (eval 2) line 1.\n
> >
> > any idea where can I find Authen::Simple::NIS v1?
>
> Actually, it's just telling you that you left off a semi-colon after 
> "use Authen::Simple::NIS".  Sorry if my earlier instructions were too 
> vague for you.  A good startup.pl for you should look like this:
>
> use strict;
> use warnings;
> use Authen::Simple::NIS;
>
> 1;
>
> Try that.
>
> - Perrin
>

Re: Failed to resolve handler

Posted by Gustavo Schroeder <gu...@gmail.com>.
httpd.conf config

PerlRequire /usr/local/apache2/conf/startup.pl
<Location /test>
  DAV svn
  SVNPath /export/svn/
  AuthType Basic
  AuthName "Authentication required"
  PerlAuthenHandler Authen::Simple::NIS
  PerlSetVar AuthenSimpleNIS_domain "boss-lab"
  Require valid-user
</Location>

startup.pl content

#!/usr/bin/env /usr/local/bin/perl
use strict;
use warnings;
use Authen::Simple::NIS;
1;

Apache2 restarts gracefully, but it's appending the same error in the
log files trying to hit url test
[Mon Jun 04 09:39:13 2007] [notice] Apache configured -- resuming
normal operations
failed to resolve handler Authen::Simple::NIS
sorry, I cant find any other kind of error in apache's log files.
any clue where I'm missing?

On 6/4/07, Perrin Harkins <pe...@elem.com> wrote:
> On 6/4/07, Gustavo Schroeder <gu...@gmail.com> wrote:
> > [Mon Jun 04 08:17:06 2007] [error] Authen::Simple::NIS version 1
> > required--this is only version 0.3 at
> > /usr/local/apache2/conf/startup.pl line 4.\nBEGIN failed--compilation
> > aborted at /usr/local/apache2/conf/startup.pl line 4.\nCompilation
> > failed in require at (eval 2) line 1.\n
> >
> > any idea where can I find Authen::Simple::NIS v1?
>
> Actually, it's just telling you that you left off a semi-colon after
> "use Authen::Simple::NIS".  Sorry if my earlier instructions were too
> vague for you.  A good startup.pl for you should look like this:
>
> use strict;
> use warnings;
> use Authen::Simple::NIS;
>
> 1;
>
> Try that.
>
> - Perrin
>

Re: Failed to resolve handler

Posted by Perrin Harkins <pe...@elem.com>.
On 6/4/07, Gustavo Schroeder <gu...@gmail.com> wrote:
> [Mon Jun 04 08:17:06 2007] [error] Authen::Simple::NIS version 1
> required--this is only version 0.3 at
> /usr/local/apache2/conf/startup.pl line 4.\nBEGIN failed--compilation
> aborted at /usr/local/apache2/conf/startup.pl line 4.\nCompilation
> failed in require at (eval 2) line 1.\n
>
> any idea where can I find Authen::Simple::NIS v1?

Actually, it's just telling you that you left off a semi-colon after
"use Authen::Simple::NIS".  Sorry if my earlier instructions were too
vague for you.  A good startup.pl for you should look like this:

use strict;
use warnings;
use Authen::Simple::NIS;

1;

Try that.

- Perrin

Fwd: Failed to resolve handler

Posted by Gustavo Schroeder <gu...@gmail.com>.
---------- Forwarded message ----------
From: Gustavo Schroeder <gu...@gmail.com>
Date: Jun 4, 2007 12:22 PM
Subject: Re: Failed to resolve handler
To: Jonathan Vanasco <jv...@2xlp.com>


[Mon Jun 04 08:17:06 2007] [error] Authen::Simple::NIS version 1
required--this is only version 0.3 at
/usr/local/apache2/conf/startup.pl line 4.\nBEGIN failed--compilation
aborted at /usr/local/apache2/conf/startup.pl line 4.\nCompilation
failed in require at (eval 2) line 1.\n

any idea where can I find Authen::Simple::NIS v1?

On 6/4/07, Jonathan Vanasco <jv...@2xlp.com> wrote:
>
> On Jun 4, 2007, at 11:08 AM, Gustavo Schroeder wrote:
>
> > startup.pl content:
> >
> > #!/usr/bin/env /usr/local/bin/perl
> > use Authen::Simple::NIS
> >
> > Error presented:
> > [Mon Jun 04 07:56:38 2007] [error] /usr/local/apache2/conf/startup.pl
> > did not return a true value at (eval 2) line 1.\n
> > [Mon Jun 04 07:56:38 2007] [error] Can't load Perl file:
> > /usr/local/apache2/conf/startup.pl for server cabal:0, exiting...
> >
> > thoughts?
>
>
> append startup.pl with
> "
>
> 1;
> "
>
> it needs to return true ( return 1 ) like a standard perl module/package
>
> // Jonathan Vanasco
>
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - - - - -
> |   CEO/Founder SyndiClick Networks
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - - - - -
> |      FindMeOn.com - The cure for Multiple Web Personality Disorder
> |      Web Identity Management and 3D Social Networking
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - - - - -
> |      RoadSound.com - Tools For Bands, Stuff For Fans
> |      Collaborative Online Management And Syndication Tools
> | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> - - - - - - - - - - - - - - - - - - -
>
>
>

Re: Failed to resolve handler

Posted by Jonathan Vanasco <jv...@2xlp.com>.
On Jun 4, 2007, at 11:08 AM, Gustavo Schroeder wrote:

> startup.pl content:
>
> #!/usr/bin/env /usr/local/bin/perl
> use Authen::Simple::NIS
>
> Error presented:
> [Mon Jun 04 07:56:38 2007] [error] /usr/local/apache2/conf/startup.pl
> did not return a true value at (eval 2) line 1.\n
> [Mon Jun 04 07:56:38 2007] [error] Can't load Perl file:
> /usr/local/apache2/conf/startup.pl for server cabal:0, exiting...
>
> thoughts?


append startup.pl with
"

1;
"

it needs to return true ( return 1 ) like a standard perl module/package

// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|   CEO/Founder SyndiClick Networks
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



Re: Failed to resolve handler

Posted by Gustavo Schroeder <gu...@gmail.com>.
Added PerlRequire /usr/local/apache2/conf/startup.pl to httpd.conf
startup.pl content:

#!/usr/bin/env /usr/local/bin/perl
use Authen::Simple::NIS

Error presented:
[Mon Jun 04 07:56:38 2007] [error] /usr/local/apache2/conf/startup.pl
did not return a true value at (eval 2) line 1.\n
[Mon Jun 04 07:56:38 2007] [error] Can't load Perl file:
/usr/local/apache2/conf/startup.pl for server cabal:0, exiting...

thoughts?

On 6/4/07, Perrin Harkins <pe...@elem.com> wrote:
> On 6/4/07, Gustavo Schroeder <gu...@gmail.com> wrote:
> > PerlModule Authen::Simple::NIS
>
> In general, it's better to load your modules from a separate file.
> Try making a startup.pl that looks like this:
>
> use Authen::Simple::NIS
>
> and then load it from httpd.conf like this:
>
> PerlRequire startup.pl
>
> That may show you some error messages that you missed before.
>
> - Perrin
>

Re: Failed to resolve handler

Posted by Perrin Harkins <pe...@elem.com>.
On 6/4/07, Gustavo Schroeder <gu...@gmail.com> wrote:
> PerlModule Authen::Simple::NIS

In general, it's better to load your modules from a separate file.
Try making a startup.pl that looks like this:

use Authen::Simple::NIS

and then load it from httpd.conf like this:

PerlRequire startup.pl

That may show you some error messages that you missed before.

- Perrin