[Chicago-talk] Apache::Session - Cookie Question

Scott T. Hildreth shild at sbcglobal.net
Tue Feb 24 16:40:38 CST 2004

We are using Request Tracker at work, which is using Mysql as the
backend db. So RT is using Apache::Session::Mysql to store the cookie
and other seesion data.  We have a intranet that has a login screen that
sets a cookie, allowing access to all the web pages without additional
logins.  They would like to have RT use that cookie as a login status as
well.  Not being much of a web developer, I've had to learn a lot about
mod_perl, Html::Mason, apache, and cookies in a short time period.  Has 
been fun, I've been wanting to work with this environment for a while. 
I have had the Mason Book and Apache Module books for some time, now I
get to actually use them.  Okay back to my question :-), when I use the
mozilla cookie manager, I can see all the cookies including the RT one.
In my ~/.mozilla dir I can see all the cookies except the RT one in the
cookies.txt file.  The RT cookie is serialized in the Mysql db.  When
the RT::mason handler is called via a browser, there is a Setupsession
Component that makes a CGI::Cookie->fetch() call.  This only returns the
cookie that is serialized in the db and not the cookies that are in the
cookies.txt file, even though the domain is the same(which is localhost
for my testing).  I think I understand that the request is handed off to
a mod_per/Mason handler which is ,for a lack of better understanding,
its own environment/process.  How does CGI::Cookie get pointed to the
stored session data and not retrieve the on disk cookies as well?  Does
anyone have any ideas or tips on how to get the on disk cookie to be
returned to the session?  I hope this makes sense, I am not really sure
how to word it  since I am not quite sure what is going on.


More information about the Chicago-talk mailing list