Hi Louis

I guess the ip_address = 'yyy' is actually meant to conceal the actual address.

I recommend you adopt the Tdbc connector for Sqlite3 creating the handle with the modified DIO::handle form

::DIO::handle Tdbc Sqlite3 -db "/.../rivet-sqlite.db

after you have downloaded the latest version of dio_Tdbc.tcl from the repository. I spotted a bug in it that made the DIO result 'numrows' command fail

https://github.com/apache/tcl-rivet/blob/3.2/rivet/packages/dio/dio_Tdbc.tcl

In case you want to stick to the traditional Sqlite connector please enable the debugging of the Session object instance and in case add more debug messages if it fails to show where it's failing to properly set the column updated values

 -- Massimo


On 3/2/26 11:31, [email protected] wrote:

Hello everyone,

i try to get sessions working with rivet 3.2.8, tcl 8.6.17, apache httpd 2.4.65, tcllib 2.0

This is my simple test page session-test.rvt
####################start
<?
package require sqlite3
package require Session
package require DIO
::DIO::handle Sqlite DIO -db "/.../rivet-sqlite.db"
Session SESSION -debugMode 0
SESSION activate

#set current_user [SESSION fetch global user_name]

#if {[::rivet::var exists username]} {
# set l_user [::rivet::var get username]
# SESSION store global user_name $l_user
#} else {
# set l_user ""
#}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto; }
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<div>User:<? #puts $current_user ?></div>
<p>Welcome to xyz the next thing <br/>Session id: <? puts [SESSION id] ?\
</p>
</body>
</html>
###################################end

The session works, until i let the session idle, if it tries to refresh the session i get this exception: Got 'near "WHERE": syntax error' executing 'UPDATE rivet_session SET WHERE 1 = 1 AND session_id = '4662D98DF8C0E99F79EF68C925F2Exxx' AND ip_address = 'yyy''
     while executing
"$this update $arrayName {*}$args"
     (object "::DIO" method "::DIO::Database::store" body line 21)
     invoked from within
"$dioObject store a -table $sessionTable -keyfield $kf"
     (object "::request::SESSION" method "::Session::id" body line 70)
     invoked from within
"id"
     (object "::request::SESSION" method "::Session::activate" body line 9)
     invoked from within
"SESSION activate"
     (in namespace eval "::request" script line 8)
     invoked from within
"namespace eval ::request $script"
     ("::try" body line 12)

Can someone help me to fix this?
Is this an error with my setup or with rivet itselve?

Unfortunally i am not able to file a bug report, as the bug software shows me "new bugs for rivet have been disabled".

Thank you!


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to