You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Arnulf Wiedemann <ar...@wiedemann-pri.de> on 2006/05/01 22:17:00 UTC
Re: Q:Example with Session package and DIO
Hello Skirmantas,
that is what I am doing:
in globalscript.tcl for rivet inf the APACHE conf directory (or where ever
that is in your case)
# SESSION stuff
set my_dir [pwd]
cd $::env(HOME)/ActiveTcl/lib/rivet/packages/dio
package require DIO
package require dio_Oracle
DIO::handle Oracle DIO -user my_db_user -pass "my_db_password" -host
"my.host.name.domain" -db my_db_name
cd $::env(HOME)/ActiveTcl/lib/rivet/packages/session
package require Session
set session_log_fd [open $::env(HOME)/APACHE/logs/session_log_[pid] a]
Session SESSION -cookieLifetime 60 -debugMode 1 -debugFile $session_log_fd
-cookieName my_name_for_the_cookie -sessionRefreshInterval 900
cd $my_dir
in every .rvt file which is called from the client (a TCL client):
set my_session_id [cookie get my_name_for_the_cookie]
set curr_session_id [SESSION activate]
# other stuff to check i.e. is the cookie still active etc.?
The client has to send back the session_id in the meta data as a Cookie!
Same works for mysql and possibly postgress (not tested by me, because I have
no postgress).
For the version of the files I am using please contact Massimo Manghi
Massimo Manghi <ma...@biol.unipr.it>, he has the current version from me and
also has added some small changes.
-- Arnulf
Am Dienstag 18 April 2006 23:27 schrieb Skirmantas Juraška:
> Hello,
> I'm pretty new with Apache Rivet, but know tcl language a little bit. Can
> someone give an example how to safe create(and when to create it) DIO
> object ( with DB name, pass, username ) and use it in Session package ( I
> have studed the manual that cames in /doc/html ). In given session example
> I saw is defined DIO object name, but how and there it was created couldn't
> figure. Thanks for answers and tips.
>
> Bye,
> Skirmantas
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org