Mandor has asked for the wisdom of the Perl Monks concerning the following question:
Am I doing something wrong? For reference# line 38 Apache::Session::File sub DESTROY { ... $self->save; # leaves here to Apache::Session ... } # line 489 Apache::Session sub save { ... return unless ( $self->{status} & MODIFIED || #leaves here to line 313 ... # line 313 Apache::Session sub MODIFIED () {2}; # off to line 497 (sub save) # line 497 Apache::Session sub save { ... $self->acquire_write_lock; # up up and away to line 565 ... # line 565 Apache::Session sub acquire_write_lock { ... return if ($self->{lock} & WRITE_LOCK); # see you at line 539 ... # line 539 Apache::Session sub WRITE_LOCK () {2}; # off to line 569 (sub acquire_write_lock) # line 569 Apache::Session sub acquire_write_lock { ... $self->{lock_manager}->acquire_write_lock($self); # We are slow +ly closing into ... # Apache::S +ession::File::Lock # line 51 # line 51 Apache::Session::File::Lock sub acquire_write_lock { ... flock($self->{fh}, LOCK_EX); # GOTO Fcntl line 203 (AUTOLOAD) # line 203 Fcntl sub AUTOLOAD { ... goto &$AUTOLOAD; # That's all folks. This one won't work.
I am using Apache 1.3.xx, ActiveState perl 631, Win32 and thepackage Request; use strict; use base 'Exporter'; use vars qw(@EXPORT); @EXPORT = qw ( handle_session ... ); use Apache::Session::File; use CGI; sub handle_session { my $cgi = CGI -> new; my %session; my $session_cookie = $cgi -> cookie ('SID'); tie %session, 'Apache::Session::File', $session_cookie, { Directory => "../data/sessions", LockDirectory => "../data/sessions" }; unless ($session_cookie) { my $session_cookie = $cgi -> cookie ( -name =>'SID', -value => $sessio +n{_session_id} ); print $cgi -> header (-cookie => $session_cookie); print 'Mmmhh.. Cookie'; # debug purpose } else { print $cgi -> header; print 'No cookie for you!'; #debug purpose } return \%session; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Apache::Session hangs
by converter (Priest) on Mar 02, 2002 at 13:03 UTC | |
by perrin (Chancellor) on Mar 02, 2002 at 17:25 UTC | |
by Mandor (Pilgrim) on Mar 02, 2002 at 15:09 UTC | |
|
Apache::SessionX
by tjmather (Initiate) on Mar 02, 2002 at 17:14 UTC | |
|
Re: Apache::Session hangs
by perrin (Chancellor) on Mar 02, 2002 at 17:27 UTC | |
|
Re: Apache::Session hangs
by Mandor (Pilgrim) on Mar 02, 2002 at 18:27 UTC |