perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gordon M Lack" <gml4...@ggr.co.uk>
Subject PerlAuthenHandler failure [mp 2.0.2]
Date Tue, 22 Nov 2005 15:44:44 GMT
-------------8<---------- Start Bug Report ------------8<----------
1. Problem Description:

   Has anyone managed to get a PerlAuthenHandler to work with
mod_perl2.0.2?

   I'm having problems getting PerlAuthenHandler to work in a .htaccess
file. It gets called, but then *all* other handlers in the directory
seem to be lost.

   Almost as if return OK from PerlAuthenHandler short-cuts to the
PerlResponseHandler?

   This happens for the equivalent build on both Solaris and Linux
systems.


   With this .htaccess file:

==========
PerlAccessHandler GML::Reporter
PerlAuthenHandler GML::Reporter
PerlAuthzHandler GML::Reporter
require group one_i_am_in
==========

   and GML::Reporter code:

==========
package GML::Reporter;

# Dummy handler - just reports it has been called.
# History etc. is at the end
##################################################################

use strict;

use mod_perl2;
use Apache2::Const qw( OK DONE DECLINED );
use Apache2::Log ();
use ModPerl::Util ();

use vars qw ( $VERSION );
$VERSION = '0.01';

our %ok_stage = (
   'PerlAccessHandler' => OK,
   'PerlAuthenHandler' => OK,
   'PerlAuthzHandler' => OK,
);

########## handler ###############################################
# This is where we start at both the authenticate and authorize stages
##################################################################
#
sub handler {
   my $r = shift;

   my $log = $r->log();

   my $call_stage = ModPerl::Util::current_callback();
   $log->warn("Handling >$call_stage<");

   return $ok_stage{$call_stage} if (exists $ok_stage{$call_stage});

# If we get here something odd has happened
#
   $log->error(sprintf("%s called at %s stage!", __PACKAGE__, $call_stage));
   return DECLINED;
}

1;
==========

the error_log on accessing a file in the directory containing the
.htaccess file reports:

[Tue Nov 22 14:30:27 2005] [warn] [client ...] Handling >PerlAccessHandler<
[Tue Nov 22 14:30:27 2005] [warn] [client ...] Handling >PerlAuthenHandler<


  NOTE THAT PerlAuthzHandler is not called!  Likewise, once
PerlAuthenHandler has been called:

a) the index.html file I am accessing is sent back as type text/plain
   (with no .htaccess it is text/html)

b) if I access the directory (rather than index.html) the error_log reports:

[Tue Nov 22 15:14:58 2005] [error] [client ...]
   Attempt to serve directory: /local/...../htdocs/BAtest/

   (with no .htaccess the index.html file is served, as "Options Indexes"
    is on).

   It looks as if once I enter a PerlAuthenHandler all other info about
the call is lost.


2. Used Components and their Configuration:

*** mod_perl version 2.000002

*** using /local/tstweb/apache/installs/2.0.55/mp_libs/Apache2/BuildConfig.pm

*** Makefile.PL options:
  MP_APR_LIB     => aprext
  MP_AP_PREFIX   => /local/tstweb/apache/installs/2.0.55
  MP_COMPAT_1X   => 0
  MP_DEBUG       => 1
  MP_GENERATE_XS => 1
  MP_LIBNAME     => mod_perl
  MP_TRACE       => 1
  MP_USE_DSO     => 1


*** The httpd binary was not found


*** (apr|apu)-config linking info

 -L/local/tstweb/apache/installs/2.0.55/lib -laprutil-0 -lgdbm -ldb-4.2 -lexpat
 -L/local/tstweb/apache/installs/2.0.55/lib -lapr-0 -lrt -lm -lsocket -lnsl -lresolv  -lpthread
-ldl



*** /XYZ/deptx/tools/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 5) configuration:
  Platform:
    osname=solaris, osvers=2.6, archname=sun4-solaris-thread-multi
    uname='sunos phu638.um.us.sbphrd.com 5.6 generic_105181-03 sun4u sparc sunw,ultra-4 '
    config_args='-dE'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-D_REENTRANT -I/XYZ/deptx/tools/include -I/XYZ/deptx/common/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    optimize='-O',
    cppflags='-D_REENTRANT -I/XYZ/deptx/tools/include -I/XYZ/deptx/common/include'
    ccversion='Forte Developer 7 C 5.4 2002/03/09', gccversion='', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-L/XYZ/deptx/tools/lib -R/XYZ/deptx/tools/lib -L/usr/ccs/lib '
    libpth=/XYZ/deptx/tools/lib /lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -lgdbm -ldb -ldl -lm -lpthread -lc
    perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
    libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-KPIC', lddlflags='-G -L/XYZ/deptx/tools/lib -R/XYZ/deptx/tools/lib -L/usr/ccs/lib'


Characteristics of this binary (from libperl):
  Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Built under solaris
  Compiled at Jul 28 2004 07:08:42
  %ENV:
    PERL_LWP_USE_HTTP_10="1"
  @INC:
    /XYZ/deptx/tools/lib/perl5/5.8.5
    /XYZ/deptx/common/lib/perl5/5.8.5
    /XYZ/deptx/tools/lib/perl5/site_perl/5.8.5
    /XYZ/deptx/common/lib/perl5/site_perl/5.8.5
    /XYZ/deptx/common/lib/perl5/site_perl
    .

*** Packages of interest status:

Apache2            : -
Apache2::Request   : -
CGI                : 3.05
ExtUtils::MakeMaker: 6.17
LWP                : 5.800
mod_perl           : -
mod_perl2          : 2.000002, 2.000002


3. This is the core dump trace: (if you get a core dump):

  [CORE TRACE COMES HERE]

This report was generated by ../bin/mp2bug on Tue Nov 22 15:10:00 2005 GMT.

-------------8<---------- End Bug Report --------------8<----------

Note: Complete the rest of the details and post this bug report to
modperl <at> perl.apache.org. To subscribe to the list send an empty
email to modperl-subscribe@perl.apache.org.
-------- Gordon Lack --------------- gml4410@ggr.co.uk  ------------
This message *may* reflect my personal opinion.  It is *not* intended
to reflect those of my employer, or anyone else.


Mime
View raw message