Like the title says, I'm wondering how to pass a tied session handle (via
PerlInitHandler My::StateInit) to the ASP global.asa file.  I'm using
Apache::Session::MySQL to look for incoming cookies, set the session_id if
not found, then pass the $session handle to the database to the default
global.asa file.  Just now sure how to do that, anyone?

###############################
package My::StateInit;

use strict;
use Apache::Session::MySQL;

sub handler() {
  my $r = shift;
  my $cookie = $r->header_in('Cookie');
  my $dbh = $DB->getHandle();

  my %session;
  eval {
   tie %session, 'Apache::Session::MySQL', $cookie, {
     Handle     => $dbh,
     LockHandle => $dbh
   };
  };
  if ($@)
  {
    tie %session, 'Apache::Session::MySQL', undef, {
      Handle     => $dbh,
      LockHandle => $dbh
    };

  }

  #### I want to pass %session to global.asa file ???   
  $r->pnotes(SESSION) = \%session;  # ???
  return OK;

}
1;
##############






K






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to