[Catalyst] Authen / Session different behavior between mod_perl and myapp_server.pl

Kevin Berggren kevinb at systemmaker.com
Fri Jun 1 02:10:15 GMT 2007


I have a situation where the Authentication / Session storage mechanism 
behaves differently under mod_perl from myapp_server.pl

There was a strikingly similar post last summer: 
http://www.mail-archive.com/catalyst@lists.rawmode.org/msg00753.html

but it seems like the problem got dropped, so here's my situation:

As asked in the earlier thread, I added

sub finalize {
my ( $c, @foo ) = @_;

use Data::Dumper;
local $Data::Dumper::Deparse;
$c->log->debug( Dumper($c->session, $c->flash) );

$c->NEXT::finalize(@foo);
}
to MyApp.pm

under myapp_server.pl, the session contents look like:

[debug] $VAR1 = {
          '__address' => '[my ip addr]',
          '__created' => 1180658359,
          '__updated' => 1180658367,
          '__user' => 'kevin',
          '__user_store' => 'default'
        };

but under mod_perl / Apache, it looks like:

[debug] $VAR1 = {
          '__address' => '[ my ip addr ]',
          '__created' => 1180657464,
          '__updated' => 1180657464,
          '__user' => 'kevin',
          '__user_store' => bless( {
                                     'auth' => {
                                                 'catalyst_user_class' 
=> 'Catalyst::Plugin::Authentication::Store::DBIC::User',
                                                 'password_field' => 
'passwd',
                                                 'password_type' => 'clear',
                                                 'user_class' => bless( {
                                                                          
'attrs' => {
                                                                                       
'alias' => 'me'
                                                                                     
},
                                                                          
'cond' => undef,
                                                                          
'count' => undef,
                                                                          
'pager' => undef,

[ huge amount of detail removed looks like my DBIC schema ]

This is running under Windows XP / Apache 2.2.4 / mod_perl 2.0.3 / 
ActiveState perl 5.8.8.820

The following plugins are loaded:

[debug] Loaded plugins:
.----------------------------------------------------------------------------.
| Catalyst::Plugin::Authentication  
0.09                                     |
| 
Catalyst::Plugin::Authentication::Credential::Password                     |
| Catalyst::Plugin::Authentication::Store::DBIC  
0.07                        |
| Catalyst::Plugin::Dumper  
0.000002                                         |
| Catalyst::Plugin::Session  
0.14                                            |
| Catalyst::Plugin::Session::State::Cookie  
0.07                             |
| Catalyst::Plugin::Session::Store::DBI  
0.11                                |
| Catalyst::Plugin::StackTrace  
0.06                                         |
| Catalyst::Plugin::Static::Simple  
0.15                                     |
'----------------------------------------------------------------------------'


Any thoughts?  Thanks in advance.

-kb

-- 
Kevin Berggren
System Maker, Inc.
kevinb at systemmaker.com
(818) 891-9132



More information about the Catalyst mailing list