You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stas Bekman <st...@stason.org> on 2002/05/07 16:25:28 UTC

[Fwd: ApacheCon US 2002: Call for Participation]

FYI

-------- Original Message --------
Subject: ApacheCon US 2002: Call for Participation
Date: Mon, 06 May 2002 13:52:22 -0400
From: Rodent of Unusual Size <Ke...@Golux.Com>
Organization: The Apache Software Foundation
To: devconf@yahoo.com, announce@apache.org, announce@ApacheCon.Com,	apache-docs@apache.org, 
ml-apache@unix-ag.org, discuss@ApacheCon.Com
Newsgroups: 
comp.infosystems.www.servers.unix,comp.infosystems.www.servers.ms-windows,comp.infosystems.www.servers.misc,de.comm.infosystems.www.servers

-----BEGIN PGP SIGNED MESSAGE-----

Call for Participation: ApacheCon US 2002
=========================================
November 18-21, 2002, Las Vegas, Nevada, US

SUBMISSION DEADLINE: Friday, 31 May 2002, 17:30 EDT

Come share your knowledge of Apache software at this
educational and fun-filled gathering of Apache users,
vendors, and friends.

Apache Software Foundation members are designing the
technical program for ApacheCon US 2002 that will include
over 40 sessions planned.

We are particularly interested in session proposals
covering:

o Apache Web server topics (installation, compilation,
   configuration, migration, Version 2.0)
o All Apache Software Foundation projects (Jakarta,
   mod_perl, Xerces, et cetera)
o scripting languages and dynamic content
   (Java, PHP, Perl, TCL, Python, XML, XSL, etc.)
o Security and eCommerce
o Performance tuning, load balancing, high availability
o tips for writing Apache Web server modules
o Technical and non-technical case studies
o new Web-related technologies

Only educational sessions related to projects of the Apache
Software Foundation or the Web in general will be considered
(commercial sales or marketing presentation won't be accepted;
please contact info@ApacheCon.Com should you be interested in
giving a vendor presentation).

If you would like to be a speaker at the ApacheCon US 2002
event, please go to the ApacheCon Web site, log in, and choose
the 'Submit a CFP' option from the list there:

  http://ApacheCon.Com/html/login.html

NOTE: If you were a speaker or delegate at a past ApacheCon,
please log in using the email address you used before; this
will remember your information and pre-load the CFP form for
you.  If this is your first time being involved with ApacheCon,
please create a new account.
- --
#ken 
P-)}

Ken Coar, Sanagendamgagwedweinini  http://Golux.Com/coar/
Author, developer, opinionist      http://Apache-Server.Com/

"Millennium hand and shrimp!"

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>

iQCVAwUBPNbCv5rNPMCpn3XdAQEOIwQAoU7FRkqL7yNhzjtUcPlEeNE/+ezgsfyN
tNbt9eVqLTm/1s0kO7LK1zKG1MAckHLXF7JYHXFlD4J9TTspMDtTUUkp5HThF6Ay
C3hm7ZnrfSO+DWKbOMZ3hHZytv8rRC8MhZe2wY5Ps5qtFRt5o4QdGAja5FRNrUwM
ozPV4l2Tk2s=
=uj+B
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: announce-unsubscribe@apachecon.com
For additional commands, e-mail: announce-help@apachecon.com

-- 


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


RE: Perrenial Sessions: -> Perrin-ial sessions

Posted by Jeff <ja...@aquabolt.com>.
Muchas gracias for the advice - this makes mucho sentido.
I will call my class Perrin-ial Sessions in Harkins homage 8-) 

Thanks a gin!

-----Original Message-----
From: Perrin Harkins [mailto:perrin@elem.com] 
Sent: 07 May 2002 23:15
To: Jeff
Cc: modperl@perl.apache.org
Subject: Re: Perrenial Sessions: An Object Interface?


Jeff wrote:
> All the e dot gee's that I can find, perldoc and guide pages show
> sessions being used with a tied old hash interface - I was wondering
if
> there is an new style object interface?

I don't actually see anything in your example that is more OO than the 
existing Apache::Session interface.  However, if you don't want to use 
the tied interface you can always access methods like STORE and FETCH 
directly.  Those methods are the tied hash interface and are safe to 
use.  It's actually faster to call them directly than to use the tied 
interface.

Personally, I've always made my own session wrapper class that called 
these methods  as needed.  I don't want a generic session interface in 
most of my applications, but rather a very specific one with methods 
like $session->is_logged_in() or $session->user().  This gives me a 
place to put the logic for timing-out sessions and managing what happens

when a session isn't found.  It also prevents problems with typos in 
session keys, since the session key names are all encapsulated in my 
custom session class.

- Perrin



Re: Apache::Session::File - never returns?

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
 > The whole point of the
 > session is to save/restore state across requests using a magic
 > session_id. It should never be a global across all requests!


well, all requests to the same child, anyway :)  keep in mind how package globals scope 
under mod_perl, given that each child has its own interpreter (if you weren't already 
thinking about it :)


 > Jeff
 > [who often feels like an idiot in the mod_perl list]


don't.  we've all been there, learning this stuff from the ground up.  at least you're 
investigating stuff yourself instead of waiting for somebody to do it for you.

keep going - it's fun stuff...

--Geoff


RE: Apache::Session::File - never returns?

Posted by Jeff <ja...@aquabolt.com>.
and the answer is...  scoping!

A little testing using lsof shows that all the Apache children are
keeping read locks on the session lock file, and that the
aquire_write_lock() function blocks when trying to get LOCK_EX

and the mistake is 
  $main::global{session} = \%session_hash;

it should of course be
  my $session = \%session_hash;

Slaps head! Of course the perl session object should be transient - it
should scope the same as the request object. The whole point of the
session is to save/restore state across requests using a magic
session_id. It should never be a global across all requests!


Jeff 
[who often feels like an idiot in the mod_perl list]


-----Original Message-----
From: Jeff [mailto:jaa.perl@aquabolt.com] 
Sent: 08 May 2002 18:06
To: modperl@perl.apache.org
Subject: Apache::Session::File - never returns?


Folks,

The following line:
1) always works when $session_id is undef, 
2) sometimes works, and sometimes (about 1 in 5 ) never returns, 
   when the session_id is set:


tie %session, 'Apache::Session::File', 
  $session_id, { Directory => '/tmp',  LockDirectory => '/tmp' };


I have to stop Apache, and the following entries appear in error log:

(in cleanup) Can't call method "acquire_write_lock" on an undefined 
value at /usr/share/perl5/Apache/Session.pm line 569 during global 
destruction.

(in cleanup) Can't call method "close" on an undefined value at 
/usr/share/perl5/Apache/Session/File.pm line 41 during global 
destruction.


Any thoughts on what I might have wrong? 

Anyone ideas about what is required for acquire_write_lock to work 
on Linux 2.4.4 with Apache/1.3.23 (Unix) Debian GNU/Linux 
mod_perl/1.26 mod_ssl/2.8.7 OpenSSL/0.9.6c


Thanks a bunch,

Jeff




Apache::Session::File - never returns?

Posted by Jeff <ja...@aquabolt.com>.
Folks,

The following line:
1) always works when $session_id is undef, 
2) sometimes works, and sometimes (about 1 in 5 ) never returns, 
   when the session_id is set:


tie %session, 'Apache::Session::File', 
  $session_id, { Directory => '/tmp',  LockDirectory => '/tmp' };


I have to stop Apache, and the following entries appear in error log:

(in cleanup) Can't call method "acquire_write_lock" on an undefined 
value at /usr/share/perl5/Apache/Session.pm line 569 during global 
destruction.

(in cleanup) Can't call method "close" on an undefined value at 
/usr/share/perl5/Apache/Session/File.pm line 41 during global 
destruction.


Any thoughts on what I might have wrong? 

Anyone ideas about what is required for acquire_write_lock to work 
on Linux 2.4.4 with Apache/1.3.23 (Unix) Debian GNU/Linux 
mod_perl/1.26 mod_ssl/2.8.7 OpenSSL/0.9.6c


Thanks a bunch,

Jeff



Re: Perrenial Sessions: An Object Interface?

Posted by Perrin Harkins <pe...@elem.com>.
Jeff wrote:
> All the e dot gee's that I can find, perldoc and guide pages show
> sessions being used with a tied old hash interface - I was wondering if
> there is an new style object interface?

I don't actually see anything in your example that is more OO than the 
existing Apache::Session interface.  However, if you don't want to use 
the tied interface you can always access methods like STORE and FETCH 
directly.  Those methods are the tied hash interface and are safe to 
use.  It's actually faster to call them directly than to use the tied 
interface.

Personally, I've always made my own session wrapper class that called 
these methods  as needed.  I don't want a generic session interface in 
most of my applications, but rather a very specific one with methods 
like $session->is_logged_in() or $session->user().  This gives me a 
place to put the logic for timing-out sessions and managing what happens 
when a session isn't found.  It also prevents problems with typos in 
session keys, since the session key names are all encapsulated in my 
custom session class.

- Perrin


Perrenial Sessions: An Object Interface?

Posted by Jeff <ja...@aquabolt.com>.
Folks,

A pol of gee's in advance - this is probably an inane question for ye
olde mod_perl gods but I'll ask it anyway to see if I get struck by the
lightning of enlightenment!

All the e dot gee's that I can find, perldoc and guide pages show
sessions being used with a tied old hash interface - I was wondering if
there is an new style object interface?

Something like:

  my $session;
  if ( exists $jar->{session} ) {
    # restore the session from server storage
    $session_id = $jar->{session}->value();
    $session = Apache::Session::File->open( $session_id, { isnew => 0,
opened => ht_time(time()) } );
    LogFatal "Didn't find session: $session_id" unless $session;

  } else {
    # Create a new session and remember the ID in a cookie
    $session = Apache::Session::File->new( $session_id, { isnew => 1,
newtime => ht_time(time()) } );
    $session_id = $session->{_session_id};
    my $sessionCookie = Apache::Cookie->new( $r,
          -name   => 'session',
          -value  => $session_id,
          -path   => '/',
          -domain => 'www.nowhere.com',
        );
    $sessionCookie->bake();
  }

TIA

Jeff