Hi.

It usually helps for any kind of support issue, if you provide some information about where this is happening : what platform, which Apache version, which perl version, which mod_perl version, etc..

Now, below :
> SetHandler              perl-script
is used when your purpose is to run a "traditional" cgi-bin script under mod_perl, not for embedded modules like your
> PerlResponseHandler     ARULink::handler
would indicate.
I suggest you try replacing this first by
SetHandler modperl

For the same reason, the line
> Options                 ExecCGI
is not necessary, since you are not executing any cgi-bin scripts in that directory, only mod_perl handlers.

Additionally, I am not quite sure of your line
>     my $cgi        = CGI->new($req_params);
I believe you should rather use
>     my $cgi        = CGI->new($req);
The CGI.pm module is smart enough, given the correct environment, to figure out that it is running under mod_perl, and then use the request object ($req) as a base to build the CGI object.

The above may well be why the CGI.pm library module is getting confused, and spinning. So try the changes first, and come back if it still has a problem.


Shibi NS wrote:
I have following Location directive in my applications conf file

<Location ~ ^/((download|ARULink|WebApp)/.*)?$>
PerlInitHandler         ARULink::setup_request
SetHandler              perl-script
PerlResponseHandler     ARULink::handler
PerlOptions             +ParseHeaders +GlobalRequest
Options                 ExecCGI
AuthName                Metalink
AuthType                Basic
PerlAuthenHandler       ARULink::MetalinkAuth
require                 valid-user
ErrorDocument           401 /handle_auth_failure
</Location>


And the ARULink::MetalinkAuth::handler is

sub handler
{
    my ($req) = @_;

    my $status;
    my $username;
    my $userid;
    my $email;

    #
    # Create a Session object.
    #
    my $req_params = $req->args;
    my $cgi        = CGI->new($req_params);
    my $session    = ARU::Session::get_cgi_session($cgi);
    $req->subprocess_env;

    ....
}

When my handler reaches line '(my $cgi    = new CGI($params);)' the
application is spinning ,seems like $req->args is returning null and
application line number 354 of CGI which is $req->subprocess_env;

Error from log file

Warning:
Deep recursion on subroutine "CGI::new" at /m/isd/pm/ARULink/MetalinkAuth.pm
line 114.


Line File                 Sub Called                                    Arg
WntA
---- ----                 ----------                                    ---
----
 359 Debug.pm             Debug::stack_trace                             Y
N
 114 MetalinkAuth.pm      Debug::__ANON__                                Y
N
 114 MetalinkAuth.pm      CGI::new                                       Y
N
 354 CGI.pm               ARULink::MetalinkAuth::handler                 Y
N

..

Any idea how can we get the $req->args which contains request information
in PerlAuthenHandler  or PerlInitHandler

--Shibi Ns--


Reply via email to