I'm hoping someone here has a suggestion-

I wrote my mod_perl app with Session::File (local development) and am
migrating it to Session::MySQL so it could cluster

I ran into this issue:

     If I try to tie with a session id that doesn't exist in the db,
the app catches an Apache::Session die

Ideally:

     If I try to tie with a session id that doesn't exist in the db,
the app rewrites the session id to null (which generates a new
session id)

to handle this under Session::File, I had a function validate the
session id given from cookie/url/getpost
     a_ is it 32 char (since ids are md5_hex generated) ?
     b_ does the file exist in the session file dir ?

then the app tied to an existing session , or , a new one

I can't figure out how to do this with Session::MySQL cleanly - the
only idea that I've come up with is pre-caching the db handle and
doing a SQL select to see if the record exists  -- but then I end up
making 2 sql queries for the session data when 1 is really all that
should be necessary.

clearly i'm missing something obvious - can someone set me straight?

(apologies if this is posted 2x, i accidentally submitted from an unsubscribed address)

Reply via email to