[Templates] Apache::Template and Apache::SessionManager

[prev] [thread] [next] [Date index for 2004/07/15]

From: Olivier K
Subject: [Templates] Apache::Template and Apache::SessionManager
Date: 11:17 on 15 Jul 2004
Hello,

I am using Apache::Template and Template::Plugin::Apache::SessionManager.
(Apache/1.3.31 (Debian GNU/Linux) mod_perl/1.29)

Basically, everything works fine with the 'File' Store, but when I
want to use the 'Postgres' Store, I get a new session everytime I
reload my page, as if the session had already expired. (And the
a_session field of the sessions table remains empty.)

I really can't figure out what's wrong, so if you have an idea... I'd
be really grateful.

Here are the logs, the apache configuration part involved, and the
source page. It's rather long, but I didn't know what to cut.

LOGS --------------------------------------------------------------------

SessionManager (19311): ---START REQUEST: /asmtt/index.html ---
SessionManager (19311): configuration settings
        SessionManagerCookieArgs = 
        SessionManagerDebug = 5
        SessionManagerEnableModBackhand = 
        SessionManagerExpire = 3600
        SessionManagerGenerate = MD5
        SessionManagerHeaderExclude = 
        SessionManagerIPExclude = 
        SessionManagerInactivity = 600
        SessionManagerItemExclude = (\.gif|\.jpe?g|\.png|\.mpe?g|\.css|\.js|\.txt|\.mp3|\.wav|\.swf|\.avi|\.au|\.ra?m)$
        SessionManagerLock = Null
        SessionManagerName = TT2SESSIONID
        SessionManagerSerialize = Storable
        SessionManagerSetEnv = 
        SessionManagerStore = Postgres
        SessionManagerStoreArgs = DataSource => dbi:Pg:dbname=authnstate, UserName => olivier, Password => plop, Commit => 1
        SessionManagerTracking = On
        SessionManagerURITracking = 
SessionManager (19311): Apache::Cookie fetch
SessionManager (19311): Apache::Session::Flex options
        Commit = 1
        DataSource = dbi:Pg:dbname=authnstate
        Generate = MD5
        Lock = Null
        Password = plop
        Serialize = Storable
        Store = Postgres
        UserName = olivier
Tied session ID = 
SessionManager (19311):  checking TTL session, ID = cd13f11eb6ec98adb713cd8b52c4e5c9 ()
SessionManager (19311): session to delete
Tied session ID = fdaa131e1c46b0eecd8933ae79598bf8
SessionManager (19311): sending cookie...
SessionManager (19311): Cookie options
        -path = /
SessionManager (19311): Apache::Cookie bake TT2SESSIONID=fdaa131e1c46b0eecd8933ae79598bf8; path=/
SessionManager (19311): ---END REQUEST---

APACHE CONF --------------------------------------------------------------------

Alias /asmtt    /home/olivier/olivier/atelier/modperl/asmtt

PerlTransHandler Apache::SessionManager
# PerlHeaderParserHandler Apache::SessionManager

<Location /asmtt>

 SetHandler perl-script
 PerlHandler Apache::Template

 TT2Params           uri env params
 TT2IncludePath      /home/olivier/olivier/atelier/modperl/asmtt/

 PerlSetVar SessionManagerTracking On
 PerlSetVar SessionManagerExpire 3600
 PerlSetVar SessionManagerInactivity 600
 PerlSetVar SessionManagerName TT2SESSIONID
 PerlSetVar SessionManagerDebug 5
# PerlSetVar SessionManagerStore File
# PerlSetVar SessionManagerStoreArgs "Directory => /tmp/apache-sessions"
 PerlSetVar SessionManagerStore Postgres
 PerlSetVar SessionManagerStoreArgs "DataSource => dbi:Pg:dbname=authnstate, UserName => olivier, Password => plop, Commit => 1"

PAGE SOURCE -------------------------------------------------

[% PROCESS header %]
[% USE s = Apache.SessionManager %]
[% s.set('name' => 'john') %]
<ul> 
<li>  SID = [% s.get('_session_id') %]</li>
<li>name = [% s.get('name') %]</li>
</ul>
[% PROCESS footer %]

-------------------------------------------------------------

Thanks a lot,

        -- 
        Olivier K

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] Apache::Template and Apache::SessionManager
Olivier K 11:17 on 15 Jul 2004

Generated at 08:55 on 15 Mar 2005 by mariachi v0.52