Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Ian Harding
Sorry, that was not really right.

"The severity level of an error message provides an indication of the
type of problem that Microsoft(r) SQL Server™ 2000 has encountered.

 Severity level 10 messages are informational  and indicate problems
caused by mistakes in the information you have entered. Severity
levels from 11 through 16 are generated by the user, and can be
corrected by the user."

I remember experimenting and finding that it was safe to consider
error levels 1 - 10 "Notice" information and > 10 always indicating a
real "Error" that should be returned to the caller.

On 5/25/05, Ian Harding <[EMAIL PROTECTED]> wrote:
> >10 indicates a critical error.
>
> On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> > Why msg_level > 10, why 10, and not 0?
> >
> > Ian Harding wrote:
> > > Vlad,
> > >
> > > I installed 0.63 and compiled and installed your module.
> > >
> > > It seems to work fine, but has a glitch I ran into as well which is
> > > that it doesn't return error codes when something went wrong with the
> > > query itself.  For example, with my hack I get this
> > >
> > > SQL:
> > >
> > > SELECT cast('foo' as int)
> > >
> > > Results:
> > >
> > > error: Database operation "exec" failed (exception NSDB, "Syntax
> > > error converting the varchar value 'foo' to a column of data type
> > > int.")
> > >
> > > Rows affected: -1
> > >
> > > With your version I get
> > >
> > > SQL:
> > >
> > > SELECT cast('foo' as int)
> > >
> > > Results:
> > >
> > > Rows affected: -1
> > >
> > > While the log indicates
> > > [25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
> > > Db_Msg_Handler(fundware): Syntax error converting the varchar value
> > > 'foo' to a column of data type int.
> > >
> > > This has to do with a fundamental change in error handling where
> > > non-network communication errors are not errors to freetds anymore.
> > > They are simply passed back to the application for it to handle.
> > >
> > > Here is my hack which seems to work but may be terribly wrong for other 
> > > reasons.
> > >
> > > int
> > > Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
> > > {
> > > Ns_DbHandle *handle = (Ns_DbHandle *) tds->parent;
> > >
> > > Ns_Log(Notice, "nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s",
> > > handle->datasource, msg->message);
> > >
> > > // Begin hack
> > > if ( msg->msg_level > 10 )
> > > Ns_DbSetException(handle, "NSDB", msg->message);
> > > // End hack
> > >
> > > return 0;
> > > }
> > >
> > >
> > >
> > >
> > > On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> > >
> > >>Try newest FreeTDS 0.63 with my modified nsfreetds driver.
> > >>
> > >>http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/
> > >>
> > >>It does not support interfaces anymore, use freetds.conf and describe
> > >>datasource there.
> > >>
> > >> nsd.tcl
> > >>
> > >>ns_section  "ns/db/pool/cbill"
> > >>ns_paramdriver  freetds
> > >>ns_paramconnections 10
> > >>ns_paramusercbill
> > >>ns_parampasswordcbill
> > >>ns_paramdatasource  Billing
> > >>ns_paramverbose Off
> > >>ns_paramlogsqlerrorsOn
> > >>ns_parammaxidle 31536000
> > >>
> > >> freetds.conf
> > >>[Billing]
> > >> host = cbill
> > >> port = 1433
> > >> tds version = 7.0
> > >>
> > >>Cory Grimster wrote:
> > >>
> > >>>Hi everyone,
> > >>>
> > >>>I'm having trouble getting nsfreetds running, and I'm hoping that
> > >>>someone can spot what I'm doing wrong.  I noticed that several people on
> > >>>the list have gotten it working at various times, so I assume it's just 
> > >>>me.
> > >>>
> > >>>I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
> > >>>won't compile on this server) and AOLserver 4.0.10
> > >>>running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
> > >>>Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
> > >>>getting the "could not allocate a handle from database pool "pool4""
> > >>>error page when I hit my site.
> > >>>
> > >>>I can connect to the SQL server with tsql, though it doesn't give me any
> > >>>output when I type in SQL commands.  Not sure what that's about.
> > >>>Authentication works fine, and it rejects me if I don't give it the
> > >>>correct credentials.  Anyway, I'm assuming that it works for now and am
> > >>>trying to get nsfreetds working.
> > >>>
> > >>>The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
> > >>>are as follows:
> > >>>
> > >>>ns_section ns/db/drivers
> > >>>ns_paramfreetds${bindir}/nsfreetds.so
> > >>>
> > >>>ns_section ns/db/pools
> > >>>ns_parampool4  "FreeTDS Pool"
> > >>>
> > >>>ns_section ns/db/pool/pool4
> > >>>ns_parammaxidle10
> > >>>ns_para

Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Ian Harding
>10 indicates a critical error.

On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> Why msg_level > 10, why 10, and not 0?
>
> Ian Harding wrote:
> > Vlad,
> >
> > I installed 0.63 and compiled and installed your module.
> >
> > It seems to work fine, but has a glitch I ran into as well which is
> > that it doesn't return error codes when something went wrong with the
> > query itself.  For example, with my hack I get this
> >
> > SQL:
> >
> > SELECT cast('foo' as int)
> >
> > Results:
> >
> > error: Database operation "exec" failed (exception NSDB, "Syntax
> > error converting the varchar value 'foo' to a column of data type
> > int.")
> >
> > Rows affected: -1
> >
> > With your version I get
> >
> > SQL:
> >
> > SELECT cast('foo' as int)
> >
> > Results:
> >
> > Rows affected: -1
> >
> > While the log indicates
> > [25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
> > Db_Msg_Handler(fundware): Syntax error converting the varchar value
> > 'foo' to a column of data type int.
> >
> > This has to do with a fundamental change in error handling where
> > non-network communication errors are not errors to freetds anymore.
> > They are simply passed back to the application for it to handle.
> >
> > Here is my hack which seems to work but may be terribly wrong for other 
> > reasons.
> >
> > int
> > Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
> > {
> > Ns_DbHandle *handle = (Ns_DbHandle *) tds->parent;
> >
> > Ns_Log(Notice, "nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s",
> > handle->datasource, msg->message);
> >
> > // Begin hack
> > if ( msg->msg_level > 10 )
> > Ns_DbSetException(handle, "NSDB", msg->message);
> > // End hack
> >
> > return 0;
> > }
> >
> >
> >
> >
> > On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> >
> >>Try newest FreeTDS 0.63 with my modified nsfreetds driver.
> >>
> >>http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/
> >>
> >>It does not support interfaces anymore, use freetds.conf and describe
> >>datasource there.
> >>
> >> nsd.tcl
> >>
> >>ns_section  "ns/db/pool/cbill"
> >>ns_paramdriver  freetds
> >>ns_paramconnections 10
> >>ns_paramusercbill
> >>ns_parampasswordcbill
> >>ns_paramdatasource  Billing
> >>ns_paramverbose Off
> >>ns_paramlogsqlerrorsOn
> >>ns_parammaxidle 31536000
> >>
> >> freetds.conf
> >>[Billing]
> >> host = cbill
> >> port = 1433
> >> tds version = 7.0
> >>
> >>Cory Grimster wrote:
> >>
> >>>Hi everyone,
> >>>
> >>>I'm having trouble getting nsfreetds running, and I'm hoping that
> >>>someone can spot what I'm doing wrong.  I noticed that several people on
> >>>the list have gotten it working at various times, so I assume it's just me.
> >>>
> >>>I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
> >>>won't compile on this server) and AOLserver 4.0.10
> >>>running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
> >>>Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
> >>>getting the "could not allocate a handle from database pool "pool4""
> >>>error page when I hit my site.
> >>>
> >>>I can connect to the SQL server with tsql, though it doesn't give me any
> >>>output when I type in SQL commands.  Not sure what that's about.
> >>>Authentication works fine, and it rejects me if I don't give it the
> >>>correct credentials.  Anyway, I'm assuming that it works for now and am
> >>>trying to get nsfreetds working.
> >>>
> >>>The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
> >>>are as follows:
> >>>
> >>>ns_section ns/db/drivers
> >>>ns_paramfreetds${bindir}/nsfreetds.so
> >>>
> >>>ns_section ns/db/pools
> >>>ns_parampool4  "FreeTDS Pool"
> >>>
> >>>ns_section ns/db/pool/pool4
> >>>ns_parammaxidle10
> >>>ns_parammaxopen10
> >>>ns_paramconnections5
> >>>ns_paramverbose$debug
> >>>ns_paramextendedtableinfo  true
> >>>ns_paramlogsqlerrors   $debug
> >>>
> >>>ns_paramdriver freetds
> >>>ns_paramdatasource fooserver [also tried fooserver:bardb]
> >>>ns_paramuser   sa
> >>>ns_parampassword   bazpassword
> >>>
> >>>ns_section ns/server/${server}/db
> >>>ns_parampools  "*"
> >>>ns_paramdefaultpoolpool4
> >>>
> >>>I have the SYBASE environment variable set to /usr/local/etc, which is
> >>>where my interfaces file lives.  It looks like this:
> >>>
> >>>fooserver
> >>>query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
> >>>4.2 instead of 8.0 and it makes no difference]
> >>>
> >>>Hopefully someone can

Re: [AOLSERVER] Help in upgrading to 3.5

2005-05-25 Thread Cynthia Kiser

You don't - you made a mistake ;).  Make sure you have
everything installed right.  You know you are using the
one from head with 'make shell'.


Yes I did. Always check your path - even if you don't think you have
multiple versions of Tcl installed.

And always check out the version you really want - I goofed and did
HEAD, rather than the head of core-8-4-branch. OK one more time!


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Zoran Vasiljevic

Am 26.05.2005 um 00:46 schrieb Jeff Hobbs:



Complex, yes, but still possible.



OK. I will give this a second look...
I recall looking at that some time ago already.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Keith Paskett

I think this is from ACS or OpenACS which try to figure out what what
database is being used and call ns_oracle, ns_postgres, etc. instead
of ns_db.

Vlad Seryakov wrote:

Who is logging this message, i could not find it in FReeTDS and AS?
Is this your application?
Notice: Database API: couldn't determine RDBMS type of database pool
"pool4".

Cory Grimster wrote:


ndsfreetds.so seems to load fine:

Notice: Db_DriverInit(freetds):  Loaded FreeTDS Driver v0.5, freetds
v0.63

It looks like the server is able to connect to the database, but
something goes wrong after that:

Notice: dbdrv: opening database 'freetds:fooserver'
Notice: Db_Msg_Handler(osaka): Changed database context to bardb'.
Notice: Db_Msg_Handler(osaka): Changed language setting to us_english.
Notice: Database API: couldn't determine RDBMS type of database pool
"pool4".


Vlad Seryakov wrote:


Do you have any errors at the server startup associated with nsfreetds?
Also, every time i open nsdb with freetds, i issue "use database" to
open appropriate
SQL server database to use.

Cory Grimster wrote:


I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds
and am
still getting a database configuration error page, this time telling me
that ACS "could not determine the RDBMS type associated with pool
"pool4".".

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing "go;" after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of
FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft
SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me
any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now
and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds
FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc,
which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.







--
Vlad Seryakov
571 262-8608 o

Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Jeff Hobbs
Zoran Vasiljevic wrote:
> Am 25.05.2005 um 21:17 schrieb Jeff Hobbs:
> > I've mentioned it before, but I'll stress it again - it is possible to
> > improve this speed, possibly dramatically.  If one were to go into the
> > mod-8-3-4-branch that ActiveState did for Cisco, you will find some
> > interesting core changes. One of them is an implementation of
> > Tcl_CloneInterp.  That would likely have a large impact, but it
> > wouldn't be trivial to port to the head and make thread-safe (est 3-4
> > weeks).

> Are you sure it is possible to low-level clone an
> interp from one thread and pass it to another?
> AFAIK, the interp should not jump threads and
> more importantly reference any Tcl_Obj's from
> the initial thread where the master interp
> was created.

Each interp is in its own thread.  The "cloning" is actually
a low-level deep copy of data structures and Tcl_Objs.  The
work to be done to ensure it is thread-safe would be making
sure the deep copy is deep enough that we don't share any
Tcl_Obj's between threads, which isn't allowed (you have to
copy them).

> This seems like a very complex task, if possible
> at all...

Complex, yes, but still possible.

Jeff


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Help in upgrading to 3.5

2005-05-25 Thread Jeff Hobbs
Cynthia Kiser wrote:
> On May 24, 2005, at 7:01 PM, Jeff Hobbs wrote:
> > 8.4.10 is just a couple weeks away, so a special patch is unnecessary.
> > Working on the 8.4 head right now should be rather safe.
>
> OK sounds good for our purposes. Where do I report that tcl
> compiled from cvs HEAD returns info patchlevel of 8.4.7?

You don't - you made a mistake ;).  Make sure you have
everything installed right.  You know you are using the
one from head with 'make shell'.

Jeff


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Who is logging this message, i could not find it in FReeTDS and AS?
Is this your application?
Notice: Database API: couldn't determine RDBMS type of database pool
"pool4".

Cory Grimster wrote:

ndsfreetds.so seems to load fine:

Notice: Db_DriverInit(freetds):  Loaded FreeTDS Driver v0.5, freetds v0.63

It looks like the server is able to connect to the database, but
something goes wrong after that:

Notice: dbdrv: opening database 'freetds:fooserver'
Notice: Db_Msg_Handler(osaka): Changed database context to bardb'.
Notice: Db_Msg_Handler(osaka): Changed language setting to us_english.
Notice: Database API: couldn't determine RDBMS type of database pool
"pool4".


Vlad Seryakov wrote:


Do you have any errors at the server startup associated with nsfreetds?
Also, every time i open nsdb with freetds, i issue "use database" to
open appropriate
SQL server database to use.

Cory Grimster wrote:


I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds and am
still getting a database configuration error page, this time telling me
that ACS "could not determine the RDBMS type associated with pool
"pool4".".

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing "go;" after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of
FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft
SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me
any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now
and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds
FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.






--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PRO

Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Why msg_level > 10, why 10, and not 0?

Ian Harding wrote:

Vlad,

I installed 0.63 and compiled and installed your module.

It seems to work fine, but has a glitch I ran into as well which is
that it doesn't return error codes when something went wrong with the
query itself.  For example, with my hack I get this

SQL:

SELECT cast('foo' as int)

Results:

error: Database operation "exec" failed (exception NSDB, "Syntax
error converting the varchar value 'foo' to a column of data type
int.")

Rows affected: -1

With your version I get

SQL:

SELECT cast('foo' as int)

Results:

Rows affected: -1

While the log indicates
[25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
Db_Msg_Handler(fundware): Syntax error converting the varchar value
'foo' to a column of data type int.

This has to do with a fundamental change in error handling where
non-network communication errors are not errors to freetds anymore.
They are simply passed back to the application for it to handle.

Here is my hack which seems to work but may be terribly wrong for other reasons.

int
Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
{
Ns_DbHandle *handle = (Ns_DbHandle *) tds->parent;

Ns_Log(Notice, "nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s",
handle->datasource, msg->message);

// Begin hack
if ( msg->msg_level > 10 )
Ns_DbSetException(handle, "NSDB", msg->message);
// End hack

return 0;
}




On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
   ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
   ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
   ns_parammaxidle10
   ns_parammaxopen10
   ns_paramconnections5
   ns_paramverbose$debug
   ns_paramextendedtableinfo  true
   ns_paramlogsqlerrors   $debug

   ns_paramdriver freetds
   ns_paramdatasource fooserver [also tried fooserver:bardb]
   ns_paramuser   sa
   ns_parampassword   bazpassword

ns_section ns/server/${server}/db
   ns_parampools  "*"
   ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
   query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the e

Re: [AOLSERVER] Help in upgrading to 3.5

2005-05-25 Thread Cynthia Kiser

OK sounds good for our purposes. Where do I report that tcl compiled
from cvs HEAD returns info patchlevel of 8.4.7?

On May 24, 2005, at 7:01 PM, Jeff Hobbs wrote:

8.4.10 is just a couple weeks away, so a special patch is
unnecessary.  Working on the 8.4 head right now should be
rather safe.



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Zoran Vasiljevic

Am 25.05.2005 um 21:17 schrieb Jeff Hobbs:



I've mentioned it before, but I'll stress it again - it is
possible to improve this speed, possibly dramatically.  If
one were to go into the mod-8-3-4-branch that ActiveState
did for Cisco, you will find some interesting core changes.
One of them is an implementation of Tcl_CloneInterp.  That
would likely have a large impact, but it wouldn't be trivial
to port to the head and make thread-safe (est 3-4 weeks).



Jeff,

Are you sure it is possible to low-level clone an
interp from one thread and pass it to another?
AFAIK, the interp should not jump threads and
more importantly reference any Tcl_Obj's from
the initial thread where the master interp
was created.
This seems like a very complex task, if possible
at all...

Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Cory Grimster

ndsfreetds.so seems to load fine:

Notice: Db_DriverInit(freetds):  Loaded FreeTDS Driver v0.5, freetds v0.63

It looks like the server is able to connect to the database, but
something goes wrong after that:

Notice: dbdrv: opening database 'freetds:fooserver'
Notice: Db_Msg_Handler(osaka): Changed database context to bardb'.
Notice: Db_Msg_Handler(osaka): Changed language setting to us_english.
Notice: Database API: couldn't determine RDBMS type of database pool
"pool4".


Vlad Seryakov wrote:

Do you have any errors at the server startup associated with nsfreetds?
Also, every time i open nsdb with freetds, i issue "use database" to
open appropriate
SQL server database to use.

Cory Grimster wrote:


I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds and am
still getting a database configuration error page, this time telling me
that ACS "could not determine the RDBMS type associated with pool
"pool4".".

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing "go;" after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me
any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds
FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.





--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.





--
AOLserver - http://www.aolserver.com/

To Remove yourself from this

Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Ian Harding
Vlad,

I installed 0.63 and compiled and installed your module.

It seems to work fine, but has a glitch I ran into as well which is
that it doesn't return error codes when something went wrong with the
query itself.  For example, with my hack I get this

SQL:

SELECT cast('foo' as int)

Results:

error: Database operation "exec" failed (exception NSDB, "Syntax
error converting the varchar value 'foo' to a column of data type
int.")

Rows affected: -1

With your version I get

SQL:

SELECT cast('foo' as int)

Results:

Rows affected: -1

While the log indicates
[25/May/2005:12:46:20][17746.1090534320][-conn:server1::0] Notice:
Db_Msg_Handler(fundware): Syntax error converting the varchar value
'foo' to a column of data type int.

This has to do with a fundamental change in error handling where
non-network communication errors are not errors to freetds anymore.
They are simply passed back to the application for it to handle.

Here is my hack which seems to work but may be terribly wrong for other reasons.

int
Ns_FreeTDS_Msg_Handler(TDSCONTEXT *ctx, TDSSOCKET *tds, TDSMESSAGE *msg)
{
Ns_DbHandle *handle = (Ns_DbHandle *) tds->parent;

Ns_Log(Notice, "nsfreetds: Ns_FreeTDS_Msg_Handler(%s): %s",
handle->datasource, msg->message);

// Begin hack
if ( msg->msg_level > 10 )
Ns_DbSetException(handle, "NSDB", msg->message);
// End hack

return 0;
}




On 5/25/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote:
> Try newest FreeTDS 0.63 with my modified nsfreetds driver.
>
> http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/
>
> It does not support interfaces anymore, use freetds.conf and describe
> datasource there.
>
>  nsd.tcl
>
> ns_section  "ns/db/pool/cbill"
> ns_paramdriver  freetds
> ns_paramconnections 10
> ns_paramusercbill
> ns_parampasswordcbill
> ns_paramdatasource  Billing
> ns_paramverbose Off
> ns_paramlogsqlerrorsOn
> ns_parammaxidle 31536000
>
>  freetds.conf
> [Billing]
>  host = cbill
>  port = 1433
>  tds version = 7.0
>
> Cory Grimster wrote:
> > Hi everyone,
> >
> > I'm having trouble getting nsfreetds running, and I'm hoping that
> > someone can spot what I'm doing wrong.  I noticed that several people on
> > the list have gotten it working at various times, so I assume it's just me.
> >
> > I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
> > won't compile on this server) and AOLserver 4.0.10
> > running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
> > Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
> > getting the "could not allocate a handle from database pool "pool4""
> > error page when I hit my site.
> >
> > I can connect to the SQL server with tsql, though it doesn't give me any
> > output when I type in SQL commands.  Not sure what that's about.
> > Authentication works fine, and it rejects me if I don't give it the
> > correct credentials.  Anyway, I'm assuming that it works for now and am
> > trying to get nsfreetds working.
> >
> > The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
> > are as follows:
> >
> > ns_section ns/db/drivers
> > ns_paramfreetds${bindir}/nsfreetds.so
> >
> > ns_section ns/db/pools
> > ns_parampool4  "FreeTDS Pool"
> >
> > ns_section ns/db/pool/pool4
> > ns_parammaxidle10
> > ns_parammaxopen10
> > ns_paramconnections5
> > ns_paramverbose$debug
> > ns_paramextendedtableinfo  true
> > ns_paramlogsqlerrors   $debug
> >
> > ns_paramdriver freetds
> > ns_paramdatasource fooserver [also tried fooserver:bardb]
> > ns_paramuser   sa
> > ns_parampassword   bazpassword
> >
> > ns_section ns/server/${server}/db
> > ns_parampools  "*"
> > ns_paramdefaultpoolpool4
> >
> > I have the SYBASE environment variable set to /usr/local/etc, which is
> > where my interfaces file lives.  It looks like this:
> >
> > fooserver
> > query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
> > 4.2 instead of 8.0 and it makes no difference]
> >
> > Hopefully someone can point me in the right direction.  I've been
> > banging my head against it for a few days now and I'm afraid that I'm
> > missing something obvious but am at a loss as to what it might be.
> >
> > Thanks in advance,
> >
> > -Cory
> >
> >
> > --
> > AOLserver - http://www.aolserver.com/
> >
> > To Remove yourself from this list, simply send an email to
> > <[EMAIL PROTECTED]> with the
> > body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> > Subject: field of your email blank.
>
> --
>

Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Do you have any errors at the server startup associated with nsfreetds?
Also, every time i open nsdb with freetds, i issue "use database" to
open appropriate
SQL server database to use.

Cory Grimster wrote:

I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds and am
still getting a database configuration error page, this time telling me
that ACS "could not determine the RDBMS type associated with pool
"pool4".".

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing "go;" after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.




--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Cory Grimster

I've tried FreeTDS 0.63 with Vlad's modified version of nsfreetds and am
still getting a database configuration error page, this time telling me
that ACS "could not determine the RDBMS type associated with pool "pool4".".

FreeTDS itself is configured correctly; after following Ian's advice
(thanks!) about typing "go;" after each SQL command at the tsql prompt,
I can select a database and run simple queries.

I appreciate the advice and am happy to have tsql returning results :)
If anyone has any further ideas on what might be keeping nsfreetds from
working I'd love to hear them :)

Thanks for all the help so far,

-Cory


Vlad Seryakov wrote:

Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.



--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Jeff Hobbs
Bas Scheffers wrote:
> Olaf Mersmann said:
> > something I discovered and later started to use. There's no question,
> > that if it where possible and feasable to present each conn a "clean
> > plate" that that would be the correct thing to do. In fact, it would

> You'd get PHP, and we all know how blindingly fast that is
> for having a completely clean interpreter every time...
>
> So it's a trade-off, you either get the fastest web-scripting
> implementation in the business, or you get a dummy proof one.

You get much more than a dummy-proof one in Tcl, but it is
important to note that you get a clone of an *AOLServer*
interp, not just a Tcl interp.  Clean Tcl interps are cheap:

% time {interp delete [interp create z]} 1000
2312 microseconds per iteration

That's on a 1.8ghz P4 running SuSE 9.2, for reference.  In
AOLServer, you do a lot more than create a clean interp, you
initialize it with *gobs* of stuff.

I've mentioned it before, but I'll stress it again - it is
possible to improve this speed, possibly dramatically.  If
one were to go into the mod-8-3-4-branch that ActiveState
did for Cisco, you will find some interesting core changes.
One of them is an implementation of Tcl_CloneInterp.  That
would likely have a large impact, but it wouldn't be trivial
to port to the head and make thread-safe (est 3-4 weeks).

However, I'm sure that a simple, thorough analysis of the
existing framework would provide enough insight into how to
cut the current startup time down without any C changes as
well.  Deferring of tasks, lazy loading, etc.

Jeff


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

It is a fork, see ChangeLog for more info, no website or any formal info
at this point yet.

Xavier Beaudouin wrote:

Humm

What is the difference between naviserver and aolserver... ?

/Xavier
Le 25 mai 05 à 20:25, Vlad Seryakov a écrit :


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of
FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft
SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give
me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now
and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the
nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc,
which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.



--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Xavier Beaudouin

Humm

What is the difference between naviserver and aolserver... ?

/Xavier
Le 25 mai 05 à 20:25, Vlad Seryakov a écrit :


Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:


Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several
people on
the list have gotten it working at various times, so I assume it's
just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of
FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft
SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give
me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now
and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the
nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried
fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc,
which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.



--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.




--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Cory Grimster

Actually the example freetds.conf file uses "tds version = 8.0" for
Microsoft SQL Server 2000.  But I understand that version 4.2 is the
most stable and I'll use that while I'm trying to get it running.

At any rate, changing the protocol version to 4.2 in the interfaces file
hasn't changed my situation.  Any additional suggestions would be geatly
appreciated :)

-Cory


Dossy Shiobara wrote:

On 2005.05.25, Cory Grimster <[EMAIL PROTECTED]> wrote:


I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
   query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]



Instead of 8.0, use "tds4.2" or possibly "tds7.0" -- I don't think
there is a "tds8.0" yet.

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.



--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Ian Harding
tsql should return results if everything is configured right.  You
might need to type

go;

after your SQL statement.  Also, I use Version 7.0 with MS SQL Server
2000.  I don't know if it will make a difference.

nsfreetds is very version dependent on freetds.  Dossy might be able
to get you an older version that worked with that freetds version.  I
have butchered it to work with a 6.4 development snapshot and that's
what I use.

Good luck!

- Ian

On 5/25/05, Cory Grimster <[EMAIL PROTECTED]> wrote:
> Hi everyone,
>
> I'm having trouble getting nsfreetds running, and I'm hoping that
> someone can spot what I'm doing wrong.  I noticed that several people on
> the list have gotten it working at various times, so I assume it's just me.
>
> I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
> won't compile on this server) and AOLserver 4.0.10
> running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
> Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
> getting the "could not allocate a handle from database pool "pool4""
> error page when I hit my site.
>
> I can connect to the SQL server with tsql, though it doesn't give me any
> output when I type in SQL commands.  Not sure what that's about.
> Authentication works fine, and it rejects me if I don't give it the
> correct credentials.  Anyway, I'm assuming that it works for now and am
> trying to get nsfreetds working.
>
> The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
> are as follows:
>
> ns_section ns/db/drivers
>  ns_paramfreetds${bindir}/nsfreetds.so
>
> ns_section ns/db/pools
>  ns_parampool4  "FreeTDS Pool"
>
> ns_section ns/db/pool/pool4
>  ns_parammaxidle10
>  ns_parammaxopen10
>  ns_paramconnections5
>  ns_paramverbose$debug
>  ns_paramextendedtableinfo  true
>  ns_paramlogsqlerrors   $debug
>
>  ns_paramdriver freetds
>  ns_paramdatasource fooserver [also tried fooserver:bardb]
>  ns_paramuser   sa
>  ns_parampassword   bazpassword
>
> ns_section ns/server/${server}/db
>  ns_parampools  "*"
>  ns_paramdefaultpoolpool4
>
> I have the SYBASE environment variable set to /usr/local/etc, which is
> where my interfaces file lives.  It looks like this:
>
> fooserver
>  query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
> 4.2 instead of 8.0 and it makes no difference]
>
> Hopefully someone can point me in the right direction.  I've been
> banging my head against it for a few days now and I'm afraid that I'm
> missing something obvious but am at a loss as to what it might be.
>
> Thanks in advance,
>
> -Cory
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <[EMAIL 
> PROTECTED]> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.
>


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Vlad Seryakov

Try newest FreeTDS 0.63 with my modified nsfreetds driver.

http://cvs.sourceforge.net/viewcvs.py/naviserver/modules/nsfreetds/

It does not support interfaces anymore, use freetds.conf and describe
datasource there.

 nsd.tcl

ns_section  "ns/db/pool/cbill"
ns_paramdriver  freetds
ns_paramconnections 10
ns_paramusercbill
ns_parampasswordcbill
ns_paramdatasource  Billing
ns_paramverbose Off
ns_paramlogsqlerrorsOn
ns_parammaxidle 31536000

 freetds.conf
[Billing]
host = cbill
port = 1433
tds version = 7.0

Cory Grimster wrote:

Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to
<[EMAIL PROTECTED]> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the
Subject: field of your email blank.


--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] nsfreetds

2005-05-25 Thread Dossy Shiobara
On 2005.05.25, Cory Grimster <[EMAIL PROTECTED]> wrote:
> I have the SYBASE environment variable set to /usr/local/etc, which is
> where my interfaces file lives.  It looks like this:
>
> fooserver
> query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
> 4.2 instead of 8.0 and it makes no difference]

Instead of 8.0, use "tds4.2" or possibly "tds7.0" -- I don't think
there is a "tds8.0" yet.

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


[AOLSERVER] nsfreetds

2005-05-25 Thread Cory Grimster

Hi everyone,

I'm having trouble getting nsfreetds running, and I'm hoping that
someone can spot what I'm doing wrong.  I noticed that several people on
the list have gotten it working at various times, so I assume it's just me.

I'm using nsfreetds 0.4 with FreeTDS 0.6.1.2 (newer versions of FreeTDS
won't compile on this server) and AOLserver 4.0.10
running on Mandrake 10.0.  I'm trying to connect to Microsoft SQLServer
Desktop Engine 2000 SP4 running on my Windows XP workstation.  I'm
getting the "could not allocate a handle from database pool "pool4""
error page when I hit my site.

I can connect to the SQL server with tsql, though it doesn't give me any
output when I type in SQL commands.  Not sure what that's about.
Authentication works fine, and it rejects me if I don't give it the
correct credentials.  Anyway, I'm assuming that it works for now and am
trying to get nsfreetds working.

The relevent sections from my config.tcl (copied from the nsfreetds FAQ)
are as follows:

ns_section ns/db/drivers
ns_paramfreetds${bindir}/nsfreetds.so

ns_section ns/db/pools
ns_parampool4  "FreeTDS Pool"

ns_section ns/db/pool/pool4
ns_parammaxidle10
ns_parammaxopen10
ns_paramconnections5
ns_paramverbose$debug
ns_paramextendedtableinfo  true
ns_paramlogsqlerrors   $debug

ns_paramdriver freetds
ns_paramdatasource fooserver [also tried fooserver:bardb]
ns_paramuser   sa
ns_parampassword   bazpassword

ns_section ns/server/${server}/db
ns_parampools  "*"
ns_paramdefaultpoolpool4

I have the SYBASE environment variable set to /usr/local/etc, which is
where my interfaces file lives.  It looks like this:

fooserver
query tcp 8.0 192.168.42.107 1433 [I have tried protocol version
4.2 instead of 8.0 and it makes no difference]

Hopefully someone can point me in the right direction.  I've been
banging my head against it for a few days now and I'm afraid that I'm
missing something obvious but am at a loss as to what it might be.

Thanks in advance,

-Cory


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Bas Scheffers
Olaf Mersmann said:
> something I discovered and later started to use. There's no question,
> that if it where possible and feasable to present each conn a "clean
> plate" that that would be the correct thing to do. In fact, it would
You'd get PHP, and we all know how blindingly fast that is for having a
completely clean interpreter every time...

So it's a trade-off, you either get the fastest web-scripting
implementation in the business, or you get a dummy proof one.

But a little more documentation on the subject would be helpful, but then
a little documentation on a lot of subject is still to be done! :)

Cheers,
Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Olaf Mersmann

Robert Seeger wrote:

I'm inclined to say it either shouldn't be documented, or it should be
documented as an undocumented behavior. I don't think this is something
that should cause backward compatibility problems later, since there's
no good reason for it to behave the way it is now (other than it's too
slow to make it behave "correctly").


I'd opt for it being documented as an undocumentend / unstable behavior
since had this thread not come up, I'd never have thought about if this
was the "correct" way to handle namespace variables. It was just
something I discovered and later started to use. There's no question,
that if it where possible and feasable to present each conn a "clean
plate" that that would be the correct thing to do. In fact, it would
probably in the long run lead to more robust code since there would be
fewer global temporary variables. Each package/module could hide them
away in its own namespace instead of using akward prefixes (at least
that's how I do it now).

-- Olaf


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Zoran Vasiljevic

Am 25.05.2005 um 16:37 schrieb Tom Jackson:


Yes, I use namespace variables to hold package startup info.
Cleaning them out
would not be good. (Since the variables are set during server
startup, they
are expected to exist in every thread.)


Tom,

It is not the question of deleting all those namespaced vars.
Of course they are needed.

But some people/software freaks out when for example *additional*
variables are added or *existing* ones changed during the processing
of the page. This introduces a non-transparent state which is difficult
to track and recover from.

Hence, in the ideal world, the interp should be left in the
pristine state after the page has been processed. This requires
a clever garbage-collection mechanism which is IMO too slow to
solve in Tcl alone by brute force.

Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Robert Seeger
I'm inclined to say it either shouldn't be documented, or it should be
documented as an undocumented behavior. I don't think this is something
that should cause backward compatibility problems later, since there's
no good reason for it to behave the way it is now (other than it's too
slow to make it behave "correctly").

Rob Seeger

Olaf Mersmann wrote on 5/25/2005, 10:25 AM:

 > Bas Scheffers wrote:
 > > I have at points relied on the fact that namespaces don't get
 > cleared out
 > > between request (though in Vignette, not AOLserver) and found it rather
 > > usefull. Fixing this "bug" will quite likely break some people's code!
 >
 > I too rely on this property of the current implementation in some of my
 > apps so fixing it would break some of my code. However, I found this out
 > the "hard" way by playing around. If this is not documented somewhere,
 > maby it should be (i.e. on the Wiki and not in the C source where there
 > probably are lots of comments relating to this).
 >
 > -- Olaf
 >
 >
 > --
 > AOLserver - http://www.aolserver.com/
 >
 > To Remove yourself from this list, simply send an email to
 > <[EMAIL PROTECTED]> with the
 > body of "SIGNOFF AOLSERVER" in the email message. You can leave the
 > Subject: field of your email blank.
 >


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Tom Jackson
On Wednesday 25 May 2005 06:58, Bas Scheffers wrote:

> Namespaces are, namespace variables are not. Some packages use them for
> temporary storage of structures (like httpd and tdom) but they provide
> their own cleanup methods.
>

Ah, thanks for pointing out this distinction. Package specific cleanup is
pretty easy to accomplish, especially considering that AOLserver has
ns_atclose. You don't even have to consider the effect of an error killing
you cleanup, since it doesn't.

> I have at points relied on the fact that namespaces don't get cleared out
> between request (though in Vignette, not AOLserver) and found it rather
> usefull. Fixing this "bug" will quite likely break some people's code!


Yes, I use namespace variables to hold package startup info. Cleaning them out
would not be good. (Since the variables are set during server startup, they
are expected to exist in every thread.)

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Olaf Mersmann

Bas Scheffers wrote:

I have at points relied on the fact that namespaces don't get cleared out
between request (though in Vignette, not AOLserver) and found it rather
usefull. Fixing this "bug" will quite likely break some people's code!


I too rely on this property of the current implementation in some of my
apps so fixing it would break some of my code. However, I found this out
the "hard" way by playing around. If this is not documented somewhere,
maby it should be (i.e. on the Wiki and not in the C source where there
probably are lots of comments relating to this).

-- Olaf


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Zoran Vasiljevic

Am 25.05.2005 um 15:39 schrieb Robert Seeger:


To add my two cents... My thought is to "avoid namespace variables". I
understand the point that cleaning up after namespace variables
would be
expensive. However, anything that prevents commands in namespaces from
working correctly should be classified as a bug and fixed. Namespaces
are an important way to organize code modules.


My 2 cents...

Actually, you would like to redesign the way AOLserver treats Tcl code.
It has to be sort of module-based, where all modules would have a
startup,
teardown and cleanup hooks which would then be called by the server
machinery at particular points.
Now, this is also not something ideal, but would be at least
controllable.

The current way of wholesale loading Tcl code and synthetizing the
introspective script is clumsy, error prone and semi-optimal.

The option of walking the namespace tree and matching all variables
found there, but not found (or even changed) in the blueprint script
is out of the question because it would be plain too slow. Hence it
was never actually implemented by anybody. I recall trying to do this
myself but abandoned the project at a very early stage.

Another idea was to create a fast interp-dup Tcl call which would
quickly junk and re-create Tcl interp as_a_whole, but this is/was
not MT-aware and hence of little use for AS (or any Tcl-threaded) app.

So, this leaves you/us with what we have now. It aint ideal but it works
for most of the folks. Admitently, the *entire* beast would need a
facelift.


Zoran


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Bas Scheffers
> expensive. However, anything that prevents commands in namespaces from
> working correctly should be classified as a bug and fixed. Namespaces
> are an important way to organize code modules.
Namespaces are, namespace variables are not. Some packages use them for
temporary storage of structures (like httpd and tdom) but they provide
their own cleanup methods.

I have at points relied on the fact that namespaces don't get cleared out
between request (though in Vignette, not AOLserver) and found it rather
usefull. Fixing this "bug" will quite likely break some people's code!

Cheers,
Bas.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Robert Seeger
To add my two cents... My thought is to "avoid namespace variables". I
understand the point that cleaning up after namespace variables would be
expensive. However, anything that prevents commands in namespaces from
working correctly should be classified as a bug and fixed. Namespaces
are an important way to organize code modules.

Rob Seeger

Dossy Shiobara wrote on 5/25/2005, 8:08 AM:
 > Avoid namespaces.  :-)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Dossy Shiobara
On 2005.05.25, Stuart Children <[EMAIL PROTECTED]> wrote:
> For example, much of the code makes use of namespaces, [...]

It is likely you will feel pain running that code under AOLserver,
because as you discovered, namespace variables do NOT get unset at the
end of request processing as part of the cleanup callback.

While it would be easy to add the necessary code to clean up namespace
variables, I think it isn't being done because doing it could get
"expensive" because, in order to implement it, we'd have to iterate over
every single namespace (which could be a large number) then retrieve the
list of variables per namespace and unset them.

> (If globals weren't cleared out either I'd have a nightmare. :])

Indeed.  Thankfully, cleaning out the global namespace is generally a
fixed cost operation and just had to be done in order to make most
scripts work in a sane fashion.

> I'm also simply interested to understand for my own benefit, and so I
> can develop future code in a manner that best suits AOLserver.

Avoid namespaces.  :-)

> >>Would people would be interested in a seperate "first adp error aborts
> >>the whole file" feature for 4.[01]? From a brief inspection of the
>
> I'll dig further with the CVS sources...

Jim's "singlescript" or whatever it was called will do what you want:
the entire ADP gets turned into a single script, and an error anywhere
in it will abort the entire script, naturally.

-- Dossy

--
Dossy Shiobara   mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
  "He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] interpreter lifecycle

2005-05-25 Thread Stuart Children

Andrew Piskorski wrote:

On Tue, May 24, 2005 at 02:10:33PM +0100, Stuart Children wrote:

in a thread between connections. So the interpreter is *not* re-cloned
between requests. Indeed, testing a template that increments a namespace


Most definitely not.  AFAIK it never has been, ever, in any version of
AOLserver.


OK. It was "Each connection thread that requires Tcl will create a copy
of the original interpreter." on
http://www.aolserver.com/docs/devel/tcl/tcl-general.html that set me on
the wrong initial track - but I realise now that "connection thread"
actually serves many "requests".


I don't think ANYONE prefers the current design; it is a compromise
due to performance and implemention constraints.  Jeff Hobbs has
pointed out that those implemention constraints should now be fixable,
it's just a matter of doing the work.


Right.


I'd be willing to help coding on this, though my knowledge of TCL
internals (from a C POV) is currently a bit lacking. Although to be
honest I'm probably looking for a quicker solution than that seems to


Just what IS the immediate problem you're trying to solve?  I don't
think you've ever actually said.


Well, there's not a specific issue. I've got a bunch of "legacy" TCL
code that I want to run under AOLserver. At the moment I'm just trying
to understand how AOLserver works to ensure I set things up in the
appropriate manner and I'm aware of what issues may arise.

For example, much of the code makes use of namespaces, but it's
previously been run in an environment where each execution gets its own
interpreter. I now know that potential assumptions in my code about
initial state may not be safe under AOLserver. There's sufficient code
that going through it all to check this is not a trivial task. (If
globals weren't cleared out either I'd have a nightmare. :])

I'm also simply interested to understand for my own benefit, and so I
can develop future code in a manner that best suits AOLserver.


Would people would be interested in a seperate "first adp error aborts
the whole file" feature for 4.[01]? From a brief inspection of the


No, I'm not interested, but I believe that feature already exists, Jim
D. implemented it - or so I seem to recall; I could be wrong.


I'll dig further with the CVS sources...

Thanks

--
Stuart Children


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> 
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.