My implementation of Apache::Session::MySQL dies along the way, and gives unclear warning. [error] Died at /usr/lib/perl5/site_perl/5.8.0/Apache/Session/Generate/MD5.pm line 40.
I decided to implement session as a module call Store::Session, so as to minimize recoding it in many script.
Babs
What does your session id have in it? Is this error produced on the initial construction of the session (aka first request) or on subsequent requests? It appears that the error you are receiving is because the session id is either empty or contains a non-alphanumeric character. Try printing the session id before calling the constructor to see if there is something in it that shouldn't be
[snip comments we don't need]
package Store::Session; use vars qw(@ISA @EXPORT); use Exporter; @ISA = qw(Exporter); @EXPORT = qw(new getId closeSession deleteObject);
use strict; use Apache::Session::MySQL;
sub new {
my ($dbh, $session_id) = @_; my %session;
tie %session, "Apache::Session::MySQL", $session_id,{ Handle => $dbh, LockHandle => $dbh
};
return;#(\%session);
Why do you have the session reference commented out, your %session goes out of scope immediately following this method and no longer has any referents so will no longer be available, which could be part of your problem. You may want to just remove the 'return' completely as 'tie' will return the referent, and assuming there is nothing after your 'tie' then it will be the last expression in the sub and will be returned automagically.
See if that helps, if not come back...
http://danconia.org
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>