IlyaS has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks,

I have my own authentication & authorization to access server using mod_perl`s PerlAuthenHandler & PerlAuthzHandler. After updating Apache to 2.4 version I have a bug with getting authorization "require"s list:
'Can't locate object method "requires" via package "Apache2::RequestRec"'
I don`t have such a problem with apache 2.2. How can I get "require"s list ?

I've read somehting about "PerlAddAuthzProvider", but how can I send "require"s list to PerlAuthenHandler module ? Also PerlAddAuthzProvider returns FORBIDDEN after using.

Sorry for my rude english

Replies are listed 'Best First'.
Re: Apache2.4, mod_perl & PerlAuthzHandler
by Your Mother (Archbishop) on Mar 14, 2016 at 12:42 UTC
    'Can't locate object method "requires" via package "Apache2::RequestRec"'

    Misspelling? s/requires/require/.

      No, it's about directive "requires" used to get a list of authorization requries
      $r->requires
      http://perl.apache.org/docs/2.0/api/Apache2/Access.html#C_requires_

      It's written in documentation about support of apache 2.4, so I thought I won't have any problems.

        Could you show the (minimum) code for a handler that is causing the error? I don't have access to a modperl installation today but someone else might see something.

Re: Apache2.4, mod_perl & PerlAuthzHandler
by vkhera (Novice) on Apr 27, 2016 at 14:59 UTC
    I stumbled across this when I ran into the same issue. For future searchers, this is what I discovered: You need to update your subclass and httpd.conf file to match the new way of things for Apache 2.4 as described in the README.apache-2.4 man page that comes with Apache2::AuthCookie.