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 Oliver Bienert <ob...@waldwerk.de> on 2005/07/29 16:28:45 UTC
session, sqlite
Hi all,
Recently I downloaded, compiled and installed rivet0.5.0 on my WinXP
machine, Apache 1.3.33. I tried the included session-demo.rvt and had a
number of problems, only partly being connected to sqlite.
session-class.tcl:
The command ::md5::md5 frequently rises an error claiming an improper
argument list because the command 'clock clicks' sometimes delivers
negative values. Also, the md5 result string sometimes contains a ';',
which also results in an error. So I've changed the command into:
::md5::md5 -hex -- $sessionIdKey
dio_Sqlite.tcl:
I created the database file and the tables with the included
session-create.sql. After calling session-demo.rvt, the first error was:
'can't read "fields": no such variable' in method fields, then, after
fixing this:
'can't read "cache": no such variable' in method next.
All these errors were probably caused by having an empty session table
at the very first start of the session module.
So I modified the method 'load_cache', although I'm not shure if this
the right place. However, now at least the session-demo.rvt script seems
to work:
protected method load_cache {} {
if {$error_exists} { return 0 }
if {$cache_loaded} { return 1 }
if [catch {
set numrows 0
set cache ""
# Doing a loop here because it's the only way to get the fields
$dbcmd eval $request a {
incr numrows
set row {}
foreach field $a(*) {
lappend row $a($field)
}
lappend cache $row
}
if {[info exists a(*)] && ![info exists fields]} {
set fields $a(*)
}
} err] {
return [check_ok 1 $err]
}
set cache_loaded 1
return [check_ok 0]
}
Any comments?
Oliver
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org
Re: session, sqlite
Posted by "David N. Welton" <da...@dedasys.com>.
Oliver Bienert wrote:
> Hi all,
>
> Recently I downloaded, compiled and installed rivet0.5.0 on my WinXP
> machine, Apache 1.3.33. I tried the included session-demo.rvt and had a
> number of problems, only partly being connected to sqlite.
Hi,
> session-class.tcl:
> The command ::md5::md5 frequently rises an error claiming an improper
> argument list because the command 'clock clicks' sometimes delivers
> negative values. Also, the md5 result string sometimes contains a ';',
> which also results in an error. So I've changed the command into:
>
> ::md5::md5 -hex -- $sessionIdKey
Good point - Damon or Karl, would you guys like to follow up on this in
CVS? You know this code a bit better than I do...
> dio_Sqlite.tcl:
> I created the database file and the tables with the included
> session-create.sql. After calling session-demo.rvt, the first error was:
> 'can't read "fields": no such variable' in method fields, then, after
> fixing this:
> 'can't read "cache": no such variable' in method next.
> All these errors were probably caused by having an empty session table
> at the very first start of the session module.
> So I modified the method 'load_cache', although I'm not shure if this
> the right place. However, now at least the session-demo.rvt script seems
> to work:
>
> protected method load_cache {} {
> if {$error_exists} { return 0 }
> if {$cache_loaded} { return 1 }
> if [catch {
> set numrows 0
> set cache ""
> # Doing a loop here because it's the only way to get the fields
> $dbcmd eval $request a {
> incr numrows
> set row {}
> foreach field $a(*) {
> lappend row $a($field)
> }
> lappend cache $row
> }
> if {[info exists a(*)] && ![info exists fields]} {
> set fields $a(*)
> }
> } err] {
> return [check_ok 1 $err]
> }
> set cache_loaded 1
> return [check_ok 0]
> }
>
> Any comments?
Thanks for taking the time to write and let us know what you've
observed, as well as your suggestions... we'll see about integrating
them into Rivet.
--
David N. Welton
- http://www.dedasys.com/davidw/
Apache, Linux, Tcl Consulting
- http://www.dedasys.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org