Yes, i am aware of Template::Plugin::Session ...
i can get that 'to work', but the problem then is
setting the cookie. I would LOVE to get
T::P::A::SM working instead, life would be MUCH
easier. :)
Here's what i have:
(httpd.conf)
PerlModule Apache::Template
TT2Params uri env params
TT2LoadPerl On
TT2EvalPerl On
PerlModule Apache::SessionManager
PerlTransHandler Apache::SessionManager
<Directory
/data/apache/sites/lerch.unlocalhost.com/html>
<Files *.html>
SetHandler perl-script
PerlHandler Apache::Template
PerlSetVar SessionManagerName
LERCHSESSIONID
PerlSetVar SessionManagerDebug 1
PerlSetVar SessionManagerTracking On
PerlSetVar SessionManagerExpire 3600
PerlSetVar SessionManagerInactivity 900
PerlSetVar SessionManagerStore File
PerlSetVar SessionManagerStoreArgs
"Directory =>
/data/apache/sites/lerch.unlocalhost.com/sessions"
</Files>
</Directory>
and my template:
[%
USE CGI;
USE Dumper;
USE DBI('dsn','user','pass');
USE session = Apache.SessionManager;
SID = session.get('_session_id');
%]
SID = [% SID %] or [% session %]<br/>
[% FOREACH s = session.get %]
* [% s %]<br/>
[% END %]
When accessed via a brower, [% SID %] is
undefined but session is a bless reference (which
dumping is NOT a good idea! jeebus that's a lot
of stuff in there! including my DBI connection
username and password!!)
All the error log reports is:
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/Apache/SessionManager.pm
line 47.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/Apache/SessionManager.pm
line 62.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/Apache/SessionManager.pm
line 47.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/Apache/SessionManager.pm
line 62.
And there are no session files in the session
dir, which has proper ownership and permissions
set. Thanks for the help so far :)
--- Enrico Sorcinelli <[EMAIL PROTECTED]>
wrote:
> On Wed, 20 Aug 2003 08:43:31 -0700 (PDT)
> Jeff Anderson <[EMAIL PROTECTED]> wrote:
>
> Hi Jeff,
>
> > [This is an Apache::Template question]
> >
> > I have been experimenting with subclassing
> > Template::Service::Apache so that i can add
> > cookie/session support to my application. I
> have
> > tried
> Template::Plugin::Apache::SessionManager
> > with no luck,
>
> Please, can you tell me more info about your
> problems on using
> T::P::A::SM (error logs and so on)?
>
> >
> > I have deduced that
> > Template::Service::Apache::params() is where
> i
> > need to test for the existance of a
> session_id in
> > the cookie, but i can't pass the created
> > Apache::Session object to my template.
>
> BTW, there is also an Apache::Session TT2
> wrapper
> (Template::Plugin::Session) :-)
>
> by
>
> - Enrico
>
> _______________________________________________
> templates mailing list
> [EMAIL PROTECTED]
>
http://lists.template-toolkit.org/mailman/listinfo/templates
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates