While working on an existing Perl/Mason project, suddenly it happened that when logging into the site as a user, am getting Access Denied error. I noticed that the login_submit.html page properly authenticates the user and is updating the session variable with the logged-in user's id within the login_submit.html page.
$m->session->{user_id} = $User->user_id;
Then its redirected to another page ( say my.html ). But once redirected, I am getting Access Denied error because $m->session->{user_id} is no longer accessible there. if I check browser's session storage, I cannot find the session key/value set for user_id .
Any idea what could be the reason ?
I have not changed any configuration setting in Dhandler.pm script. Though I am pasting it below for your reference, in case someone can think of a possible reason.
Note: Everything was working fine and I am almost 99% sure that I have not changed something that would have broken the login function. I was in fact working on a form update function which updates the User table.# Create Mason ApacheHandler object. my $mason = new HTML::Mason::ApacheHandler( comp_root => [ [ document_root => $MYPROJECT::DOCUMEN +TS_DIR ], [ lib => "$MYPROJECT::ROOT_D +IR/mason_lib" ], ], data_dir => "$MYPROJECT::ROOT_DIR/tmp/mason", autohandler_name => '.autohandler.mas', dhandler_name => '.dhandler.mas', allow_globals => [ qw/$dbh $Member %Cookies $Exception $Si +te/ ], decline_dirs => 1, error_mode => 'fatal', request_class => 'MasonX::Request::WithApacheSession', session_class => 'Apache::Session::MySQL', session_use_cookie => 1, session_cookie_name => 'session_id', session_cookie_expires => '+3d', session_cookie_resend => 1, args_method => "mod_perl", session_handle => $dbh, session_lock_handle => $dbh, );
In reply to Perl Mason | Session Hash not stored in Browser by premsai
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |