Package: libhtml-mason-perl
Version: 1:1.36-2
Severity: normal

Hello,

until some days ago, my mason-based sites worked just fine.
After upgrading to perl 5.10 one site stopped working. I have done some
research and I suspect the culprit is HTML::Mason::ApacheHandler.

In this particular configuration I authenticate the users, so I need to
subclass HTML::Mason::ApacheHandler.
The system works just fine for plain HTML files, but the apache process
crashes if I use a mason page, leaving this line in the error log:

[Fri May 09 00:04:47 2008] [notice] child pid 22953 exit signal Segmentation 
fault (11)

If I modify my apache configuration for the site, avoiding to use my
subclassed handler (i.e. if I substitute the line "PerlHandler My::Handler"
with "PerlHandler HTML::Mason::ApacheHandler") the system doesn't crash
anymore, but obviously I have no sessioning.

I inserted some print lines in handler.pl and I traced the problem to
the line calling HTML::Mason::ApacheHandler::handle_request.

I tried to strip down my configuration to the minimum to reproduce the
problem.

The apache config:

<VirtualHost *>
        ServerName my.web.site
        ServerAdmin [EMAIL PROTECTED]
        DocumentRoot /var/www/my.web.site
        
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/my.web.site>
                Options +Indexes +Includes +FollowSymLinks +MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/my.error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/my.access.log combined
        ServerSignature On

    <IfModule mod_dir.c>
        DirectoryIndex index.mhtml index.shtml index.cgi index.php index.html
    </IfModule>

    <IfModule mod_perl.c>
                PerlRequire /etc/apache2/handler.pl

                <FilesMatch "^.*?mhtml$">
                        SetHandler perl-script
                        AddType text/html .mhtml
                        PerlHandler My::Handler
                        #PerlHandler HTML::Mason::ApacheHandler
                        DefaultType text/html
                </FilesMatch>
                <FilesMatch "^.*?comp$">
                        SetHandler perl-script
                        PerlInitHandler Apache2::Const::NOT_FOUND
                </FilesMatch>
        <Files ~ "(^\.ht|handler$)">
                        Order allow,deny
                        Deny from all
                </Files>
                <Location /components>
                        Order allow,deny
                        Allow from all
                </Location>
    </IfModule>
</VirtualHost>


My handler.pl:

#!/usr/bin/perl

package My::Handler;

use HTML::Mason::ApacheHandler(args_method=>'CGI');
use strict;
use Apache2::Const qw(:common);
use Apache2::Request;
use Apache2::RequestRec ();

{
        package HTML::Mason::Commands;
        use Data::Dumper;
        use vars qw($dbh);
        use CGI::Cookie;
        use Apache::DBI;
        use Apache2::Request;
}

my %ah;         # HTML::Apache::Handler (session)
$ah{"my.web.site"} = new HTML::Mason::ApacheHandler(
                comp_root => "/var/www/my.web.site",
                data_dir => "/var/cache/mymason",                       # Cache 
dir
                args_method => "mod_perl",
                request_class => 'MasonX::Request::WithApacheSession',
                session_class => 'Apache::Session::MySQL',
                session_use_cookie => 1,
                session_cookie_name => "my.web.site-cockie",
                session_cookie_name => "my.web.site-cockie",
                session_cookie_expires => "+4h",
                session_data_source => 'dbi:mysql:sessions;',
                session_user_name => 'sqluser',
                session_password => 'sqlpassword',
                session_lock_data_source => 'dbi:mysql:sessions;',
                session_lock_user_name => 'sqluser',
                session_lock_password => 'sqlpassword'
                );
Apache::DBI->connect_on_init("dbi:mysql:dbname=my", "sqluser", "sqlpassword");

sub handler
{
        my ($r) =  @_;
        my $site = $r->dir_config('my.web.site');

        # The apache process crashed executing this line
        my $status = $ah{"my.web.site"}->handle_request($r);
        return $status;
}

1;

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.24-1-686 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)
Shell: /bin/sh linked to /bin/bash

Versions of packages libhtml-mason-perl depends on:
ii  libcache-cache-perl           1.05-2     Managed caches of persistent infor
ii  libclass-container-perl       0.12-2     Glues object frameworks together t
ii  libexception-class-perl       1.24-1     a module that allows you to declar
ii  libhtml-parser-perl           3.56-1+b1  A collection of modules that parse
ii  libparams-validate-perl       0.89-2+b1  validate parameters to Perl method
ii  perl                          5.10.0-9.1 Larry Wall's Practical Extraction 
ii  perl-base [libscalar-list-uti 5.10.0-9.1 The Pathologically Eclectic Rubbis

Versions of packages libhtml-mason-perl recommends:
ii  libapache2-mod-perl2          2.0.4-1    Integration of perl with the Apach

-- no debconf information



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to