Hi,
I have the following code,
package AccountSheet;
use strict;
use warnings;
use base qw(CGI::Application);
use CGI::Application::Plugin::Session;
use CGI::Application::Plugin::Authentication;
use Text::Trim;
use Log::Log4perl;
sub setup {
my $self = shift;
$self->mode_param('rm');
$self->param('serverRoot', 'd:\\adminhost\\account\\');
$self->tmpl_path($self->param('serverRoot') . 'template/');
$self->run_modes(
'login' => 'showLogin',
'accountQuery' => 'showAccountQuery',
'logout' => 'showLogout',
);
$self->start_mode('login');
$self->session_config(
CGI_SESSION_OPTIONS => ["driver:file",
{
Directory => $self->param('serverRoot') . 'tmp',
}
],
DEFAULT_EXPIRY => '+10m',
);
$self->header_props(-Cache_Control => 'no-cache, max-age=0');
$self->header_add(-PRAGMA => 'no-cache');
}
sub cgiapp_init {
my $self = shift;
$self->authen->config(
DRIVER => ['Authen::Simple::LDAP',
host => 'myserver',
basedn => 'o=orag',
],
STORE => 'Session',
LOGIN_RUNMODE => 'login',
POST_LOGIN_RUNMODE => 'accountQuery',
LOGOUT_RUNMODE => 'logout',
CREDENTIALS => ['userID', 'password'],
);
$self->authen->protected_runmodes(':all');
}
sub cgiapp_prerun {
my $self = shift;
}
sub showLogin {
my $self = shift;
}
sub showAccountQuery {
my $self = shift;
}
sub showLogout {
my $self = shift;
}
sub cgiapp_postrun {
my $self = shift;
}
sub teardown {
my $self = shift;
}
1;
I got Error 500 when execute this module. And there is following error
in error.log
Error executing class callback in prerun stage: Failed to Create
CGI::Session object :: Reason: new(): failed: query object
HASH(0x154f72c) does not support cookie() and param() methods: Can't
call method "cookie" on unblessed reference at
C:/Perl/site/lib/CGI/Session.pm line 666.\n at
C:/Perl/site/lib/CGI/Application/Plugin/Authentication/Store/Session.pm
line 83\n
What does it mean and how can I solve it? My CGI::Application,
CGI::Application::Plugin::Session,
CGI::Application::Plugin::Authentication and CGI::Session are most
updated version.
Regards,
Anthony
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]