Re: [AOLSERVER] config file example of multihome config?

2006-04-30 Thread Wojciech Kocjan
. -- Wojciech Kocjan [EMAIL PROTECTED] -- 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] Design for a framework

2006-03-28 Thread Wojciech Kocjan
(especially with long lasting queries) Any comments on this? -- Wojciech Kocjan [EMAIL PROTECTED] -- 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

Re: [AOLSERVER] Bind -B option

2006-03-19 Thread Wojciech Kocjan
Address 62.1.2.3 ns_section ns/server/$server/module/nssock1 ns_paramPort 80 ns_paramHostname www.private.dns.name ns_paramAddress 192.168.0.1 -- Wojciech Kocjan [EMAIL

Re: [AOLSERVER] Help, read blocks when using openssl

2005-10-25 Thread Wojciech Kocjan
Dnia 25-10-2005 o 22:23:51 Ron Emerick [EMAIL PROTECTED] napisał: # establish connection set fds [ns_openssl_sockopen $host $port set r [lindex $fds 0] set w [lindex $fds 1] # send request puts $w $httprequest\n\n flush $w while {[set line [string trim [gets $r]]] != } {

Re: [AOLSERVER] AOLserver Wiki is now running MediaWiki!

2005-10-07 Thread Wojciech Kocjan
Dnia 07-10-2005 o 09:42:00 Daniël Mantione [EMAIL PROTECTED] napisał: Op Thu, 6 Oct 2005, schreef Dossy Shiobara: I'd like to hear what people think now that the wiki is running MediaWiki. Will this encourage you to use it more? Less? You should convince the Wikipedia-developers to port

Re: [AOLSERVER] FW: [Tcl-announce] Tcl/Tk 8.4.11 Release Announcement

2005-06-30 Thread Wojciech Kocjan
Dossy Shiobara napisał(a): Interesting -- I honestly don't know the finer details, but I know that on (not sure which, but) Solaris or Linux, it won't even compile. It sure didn't compile on: SunOS mars 5.7 Generic_106541-37 sun4u sparc SUNW,Ultra-4 -- WK -- AOLserver -

Re: [AOLSERVER] Module help

2005-06-30 Thread Wojciech Kocjan
Andrew Piskorski napisał(a): On Thu, Jun 30, 2005 at 08:40:38AM +0100, Bas Scheffers wrote: I have my own perfectlty working Tcl version of it, the reason I wanted a C based version is so I can call it from other C modules, namely my You can call Tcl from C (with Ns_TclEval, probably other

[AOLSERVER] Help in upgrading to 3.5

2005-05-20 Thread Wojciech Kocjan
Hello, I just downloaded Tcl 8.4.9, compiled (--enable-threads) and AOLserver 3.5.11, since I want to switch to 3.4 or 4.0. I would have switched to 4.0, but we also use mysql, which does not seem to compile against 4.0.10 that I have. The issue is that from time to time AOLserver starts (3.4.2

Re: [AOLSERVER] Help in upgrading to 3.5

2005-05-20 Thread Wojciech Kocjan
Dossy Shiobara napisa(a): On 2005.05.20, Wojciech Kocjan [EMAIL PROTECTED] wrote: I just downloaded Tcl 8.4.9, compiled (--enable-threads) and AOLserver 3.5.11, since I want to switch to 3.4 or 4.0. First, you want to use /either/ Tcl 8.4.6 or Tcl 8.4.9.1 -- versions between 8.4.7 and 8.4.9 had

Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a): This is exactly what I was looking for... I just need to adapt it for LDAP and SQL... and add a callback to auto garbage collector old database stuff to get a TTL for cached hosts :) Well why don't you just change the cache type to timing out, just switch from

[AOLSERVER] Cache timeout handling in 3.x

2005-05-11 Thread Wojciech Kocjan
Hello, I've noticed that in 3.4.2 (the code is quite different in 4.0, so it's hard to say how it handles that), the cache mechanism tends to update expiration date when I call Ns_CacheCreateEntry on an existing entry. I wanted to have a cache that expires after at most 15 minutes, because I have

Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a): Well why don't you just change the cache type to timing out, just switch from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work. Thanks for the advice... :) Now I just need to code the ldap part :) How did googling 'tcl ldap' end up? I remember there is an LDAP

Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-09 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a): Please tell me how http request is handled by aolserver, in which files I have to dig and how can I add it nicely to, I hope, integrate this functionality on next aolserver version if it is possible... ? Well, you can have a look at nsdqe (not really sure where you'd

Re: [AOLSERVER] The 'weird 0 length problems' revisited

2004-12-08 Thread Wojciech Kocjan
Bernd Eidenschink napisa(a): It's similar the same like in this original thread: http://www.mail-archive.com/aolserver@listserv.aol.com/msg05617.html Every piece of content goes (finally) through ns_returnfile or ns_return (or rl_returnz). The most interesting thing is that after browsing through

Re: [AOLSERVER] Support for non-HTTP protocols

2004-08-18 Thread Wojciech Kocjan
Jim Wilcoxson wrote: IMO it is not scalable to use connection servicing threads to spool output when the size of the output exceeds the socket buffer capacity. Doing I/O with non-blocking, event-driven threads also helps prevent DOS attacks. The trade-off is in memory usage: when a connection

Re: [AOLSERVER] ad_conn url cuts off after th #

2004-08-07 Thread Wojciech Kocjan
Tracy Adams wrote: Any idea how to reference the COMPLETE URL? The # is cut by the browser. [EMAIL PROTECTED]:~$ netcat -l -p 8080 195.82.181.6 GET /test/a HTTP/1.1 Host: dq.pl:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.5) Gecko/20031007 MultiZilla/1.6.3.0d Accept:

Re: [AOLSERVER] SQLite

2004-07-14 Thread Wojciech Kocjan
Bas Scheffers wrote: Hi, Has anyone done any work in integrating SQLite with the ns_db api? Might be an interesting project for 2 reasons: 1) There will be a simple DB again right out of the box, like the Illustra days and 2) it will be easy to write smaller, packaged apps that run out of the box

Re: [AOLSERVER] SQLite

2004-07-14 Thread Wojciech Kocjan
Dossy wrote: Two people consitutes wide interest? :-) Two people asked. I wonder how many people would really be interested in nssqlite. If Wojciech doesn't want to support or maintain it, then yes, we can import it into SF CVS to make sure it's got a permanent place to live. But, it depends on

Re: [AOLSERVER] SQLite

2004-07-14 Thread Wojciech Kocjan
Andrew Piskorski wrote: If Wojciech doesn't want to support or maintain it, then yes, we can import it into SF CVS to make sure it's got a permanent place to Even if, hopefully, he does want to maintain it! Yes, as I said before - I can. I'd need to clean up the code, but when I tested it against

Re: [AOLSERVER] Virtual hosting under 4.x and default Host: header

2004-07-13 Thread Wojciech Kocjan
Dossy wrote: How do people feel about this? Is glob matching wanted enough to incur that per-request cost -- only if you're configured for software virtual hosting, of course. Actually, my company is using a different approach to vhosting (I do this for docroot, but this method could be used here

Re: [AOLSERVER] DOC: How to set up Wikit under AOLserver

2004-06-25 Thread Wojciech Kocjan
Dossy wrote: This might be useful for anyone not wanting to install cgi etc. and is a nice alternative to running in local mode (where external links don't work and the font is too small). Ah, yes. Since the Wikit documentation already covers the many non-AOLserver ways of running it, I didn't

Re: [AOLSERVER] Deallocating cache entries that contain dynamic allocations

2004-06-08 Thread Wojciech Kocjan
David Pautler wrote: Ns_CacheCreateEntry http://aolserver.com/docs/devel/c/api/c-ch19.htm#536071 does not take a parameter indicating the expected size of the cache entry. Does this answer your question? Ns_CacheSetValueSz Overview Set value of cache entry and adjust cache size Syntax void

Re: [AOLSERVER] Expect in AOLserver?

2003-09-14 Thread Wojciech Kocjan
Andrew Piskorski wrote: I have an Expect script which I'm exec'ing from AOLserver. This works, and the inefficiency of forking doesn't really matter in this case. But it's annoying, as it means I can only communicate with the Expect script via command line arguments and stdin/stdout/stderr. I'd

[AOLSERVER] SQLite driver (was) Re: Are the weekly chats officially dead?

2003-07-31 Thread Wojciech Kocjan
Roberto Mello wrote: - An SQLite driver (hopefully I'll get that working soon). This one is actually tricky. In order to use SQLite in production enviroment, you need to catch SQLITE_SCHEMA errors and reeval the query. If you want to experiment, here's my beta driver -

Re: [AOLSERVER] SQLite driver (was) Re: Are the weekly chats officially dead?

2003-07-31 Thread Wojciech Kocjan
Dossy wrote: On 2003.07.31, Wojciech Kocjan [EMAIL PROTECTED] wrote: It works faster than nsmysql, at least for me... The main problem is date/time/datetime... Yuck. Not to get all defensive, but are you saying the nssqlite driver is faster than the nsmysql driver, or that SQLite is faster than

Re: [AOLSERVER] Are the weekly chats officially dead?

2003-07-31 Thread Wojciech Kocjan
Roberto Mello wrote: - Readline support for nscp. That would be quite hard, since readline also has to guess the terminal type and so on. Wouldn't it be much better to write nscp client in Tcl+readline or even Tk. I have a pretty generic ztelnet module, which I use to connect. It's pretty old and

Re: [AOLSERVER] Does AOLserver support Tcl VFS? Starpacks? [incr Tcl]?

2003-07-25 Thread Wojciech Kocjan
Jeff Hobbs wrote: Greg Wolff wrote: Why do we need a MetaKit db driver? Eh, who said anything about needing one? It would be nice to have a db driver for metakit though. Not really, since db drivers are SQL based and MetaKit isn't. If someone wants an embedded database, then SQLite would be much

Re: [AOLSERVER] weird 0 length problems

2003-07-13 Thread Wojciech Kocjan
It seems that the problem still remains (and is even more interesting). After reading nssock sources, I realized that my checking if NS_CONN_CLOSED flag is set would not make things any better - since after doing close(), connPtr-socket is set to INVALID_SOCKET (to avoid writing to invalid

Re: [AOLSERVER] weird 0 length problems

2003-07-09 Thread Wojciech Kocjan
Dossy wrote: I've been wondering about this and decided to review some of the code that is called in my AOLserver. There seems to be a wrong manner of coding that sometimes there is somefile.adp which does % ns_returnredirect /someotherfile.adp %. It does not always call ns_adp_(abort|break) -

Re: [AOLSERVER] weird 0 length problems

2003-07-07 Thread Wojciech Kocjan
Wojciech Kocjan wrote: From what I'm logging, AOLserver seems to get correct data to Ns_ConnReturnData(). I've nailed down the problem to Ns_WriteConn() not returning NS_OK. And that is caused by (*connPtr-drvPtr-writeProc) returning -1, don't exactly know why. I guess I should look at nssock

Re: [AOLSERVER] weird 0 length problems

2003-07-07 Thread Wojciech Kocjan
Zoran Vasiljevic wrote: On Monday 07 July 2003 11:45, you wrote: Ok, I'm not going to try deeper (in the kernel source :-). Could anybody please tell my when send() can return EPIPE error? When writing to sock and nobody's listening on the other end. Zoran Ok, then why does mozilla/ie show up

[AOLSERVER] weird 0 length problems

2003-07-06 Thread Wojciech Kocjan
Hello. My AOLserver is getting a lot (about 50) requests that it serves with Content-length of 0. Most of the times, people just do reload and it serves the exact page correctly. It happens very rarely (50 times for about 20 000 requests). I'm wondering how to find the bug, since I use much C

Re: [AOLSERVER] weird 0 length problems

2003-07-06 Thread Wojciech Kocjan
Dossy wrote: On 2003.07.06, Wojciech Kocjan [EMAIL PROTECTED] wrote: My AOLserver is getting a lot (about 50) requests that it serves with Content-length of 0. Most of the times, people just do reload and it serves the exact page correctly. It happens very rarely (50 times for about 20 000

Re: [AOLSERVER] weird 0 length problems

2003-07-06 Thread Wojciech Kocjan
Jim Wilcoxson wrote: The thing is I can't reproduce it, even when doing ab on both the same host and another one on a 100MBit LAN. I've hit about 3k hits and nothing. You are sending concurrent requests, right? I've tried from -c 5 to -c 20, on both machines (so that gives from 10 to 40

Re: [AOLSERVER] Native drivers for SAP DB and/or Firebird

2003-07-05 Thread Wojciech Kocjan
Radu-Mihail Obada wrote: Hey everyone, Just curious if there are any native drivers for SAP DB and/or Firebird, cause I'm intending to deploy a three-tier solution based on (preferably) a SAP DB backend (or Firebird, for that matter). SAPDB uses ODBC as *native* api, so you should probably ask

Re: [AOLSERVER] Ns_TclAllocateInterp(), Ns_TclDeAllocateInterp() and nscp

2003-06-09 Thread Wojciech Kocjan
Ok, I've narrowed down the problem. I'm calling Ns_TclAllocateInterp() from a callback in SQLite. I want to write SQLite functions using Tcl, which should be pretty easy. The problem is that I do not know the Tcl_Interp that called 'ns_db select'. Things get complicated when current thread has no

Re: [AOLSERVER] Bytecode-compiled Tcl question

2003-06-09 Thread Wojciech Kocjan
Alexander Leykekh wrote: You cannot share Tcl objects across threads - not even lists, ints and strings. I had no idea... How should I deal with that string object's garbage collection? Perhaps I shouldn't call Tcl_IncrRefCount on it and that's enough to prevent a leak. Actually, if you don't call

Re: [AOLSERVER] aolserver + php

2003-06-07 Thread Wojciech Kocjan
Micha Nasiadka wrote: is segfaulting, while trying to use phpmyadmin, so I think it's something linked to mysql connectivity from php. Tried changing stacksize, tried even the devel versions of php, no luck. Can anybody help? What did you set your stacksize to? I believe it was 512*1024. What

[AOLSERVER] sqlite and AOLserver

2003-06-07 Thread Wojciech Kocjan
Hello. I've been wondering if anyone has tried to use SQlite with AOLserver. I've noticed that, when compiled with threads enabled, it should be thread-safe: SQLITE_BUSY This return code indicates that another program or thread has the database locked. [cut]. Locking in SQLite is on the

Re: [AOLSERVER] Bytecode-compiled Tcl question

2003-06-05 Thread Wojciech Kocjan
Alexander Leyke wrote: Hello, I am getting a SIGABRT when evaluating string objects in AOLserver 4.0 b6. The pseudocode is: [cut] Tcl_DecrRefCount (obj) /* NOTE: this statement happens later, and in a different thread */ You cannot share Tcl objects across threads - not even lists, ints and

Re: [AOLSERVER] AOLserver Improvment Proposal

2003-03-10 Thread Wojciech Kocjan
Tomasz Kosiak wrote: Few days ago there was a post from Jerry Asher titled [AOLSERVER] virtual hosting options and a fantasy mentioning my proposals. I would like to present them fully to the public. This indeed is a big problem, even bigger since from what I see every company using AOLserver

Re: [AOLSERVER] Tcl bytecode caching for Tcl pages

2003-02-25 Thread Wojciech Kocjan
Bas Scheffers wrote: Makes sense. So what is cleared up in the interpreter after each request? Looking at the slides, there is a command table and a variable table. Looking at Wojciech's post, it seems any procedures created/packages loaded in the current interpreter stay there, is that correct?

Re: [AOLSERVER] Tcl bytecode caching for Tcl pages

2003-02-24 Thread Wojciech Kocjan
Bas Scheffers wrote: Cool. Question still remains which is faster, cached .tcl pages or a heavy master interpreter. Would be interesting to see. May have a play with that over the next few weeks. I played a bit with bytecode speed issues on AOLserver as well. Tested on 3.4.2 with 8.3.4. First of

[AOLSERVER] Weird SEGV

2003-02-09 Thread Wojciech Kocjan
I just got a very weird SEGV, which is caused from time to time by a Tcl-only script. Any ideas what this could be? AOLserver is 3.4.2-dq4 (Tcl8.3.4 and some minor modifications - no important changes from 3.4.2 expect 8.3.4 I suppose). #0 0x080cb369 in Tcl_NextHashEntry (searchPtr=0xbc7ff884)

Re: [AOLSERVER] Need pointer to docs please

2003-01-07 Thread Wojciech Kocjan
Michael Teter wrote: I'm looking at Aolserver, and I can't seem to find documentation on session management. AOLserver has no native sessions, but I wrote a C module that does this (among other things): http://www.dq-e.com/nsdqe/nsdqe1.0.tar.gz It works that it does not force you to accept

Re: [AOLSERVER] Rewrite URL module ready for review

2002-12-30 Thread Wojciech Kocjan
Tom Jackson wrote: Rob Mayoff's original nsrewrite module now has documentation on use. I would like to add this to the list of AOLserver modules available from SourceForge, assuming there is interest. Anyone wishing to review the files in this module can visit the temporary home at: Here's

Re: [AOLSERVER] How to remove unsafe commands?

2002-11-29 Thread Wojciech Kocjan
Bernd Eidenschink wrote: Well, the line above, if uncommented, creates a (big) file which holds all procs sourced in after startup. Is it a bad idea, maybe before use on the production system, to let AOLserver create the file, byte compile the procs, adding load libtbcload... and sourcing this

Re: [AOLSERVER] ns_socklistencallback

2002-11-27 Thread Wojciech Kocjan
Tom Jackson wrote: David Walker wrote: I want to support a reasonable number of concurrent connections. I am running a tcl based SMTP filter/server based on the smtpd in tcllib. I am converting it to run within AOLServer. Can ns_socklistencallback push the conn to another thread or will I

Re: [AOLSERVER] using aolserver for mail

2002-11-18 Thread Wojciech Kocjan
Gabriel Ricard wrote: Ok, this may be a totally crazy idea that's completely unnecessary, but here it goes: It's necessary - I've never seen any smtpd that would have Tcl embedded :( Exim has Perl. We should have Tcl! :-) I want to have a high performance mail server that's easy to configure

Re: [AOLSERVER] nsopenssl issue you need to be aware of

2002-10-25 Thread Wojciech Kocjan
Scott S. Goodwin wrote: The nsopenssl module should *not* be loaded more than one time in a server. I have received reports of corrupted data being received when the receiving SSL server has more than one copy of nsopenssl loaded, while using the ns_httpspost command. Other nsopenssl Tcl and C

Re: [AOLSERVER] nsopenssl issue you need to be aware of

2002-10-25 Thread Wojciech Kocjan
David Walker wrote: If nsopenssl is the only SSL on that box you should be able to use 0.0.0.0 and bind to all addresses. Apache binds to one IP and AOLserver binds to two IPs. I'll just switch to iptables' redirection for now... -- WK (written at Stardate 56816.9) Data typing is an illusion.

Re: [AOLSERVER] read nsd command line from nsd.tcl?

2002-10-23 Thread Wojciech Kocjan
Andrew Piskorski wrote: Is there any good way to access the command line that AOLserver started with from the context of the nsd.tcl config file? It would be nice to be able to set different config settings based on nsd command line options. I'm only guessing, but have you tried 'env' variable

Re: [AOLSERVER] [ANNOUNCE] nsdqe pre-release 0.9

2002-10-01 Thread Wojciech Kocjan
Hello again. I resent the code (www.zoro2.org/dqe-0.9.tar.gz). There were two bugs I found just today (that's what happens when I do things in a hurry :). If anyone has downloaded it and it either crashed or dqe_enc didn't work, please download again and recompile. Hope I'm not trashing the

Re: [AOLSERVER] Two modules for AOLServer available

2002-09-28 Thread Wojciech Kocjan
Roberto Mello wrote: Wow, this flurry of modules for AOLserver is fantastic! Keep'em coming, and thanks for your contributions. I'm on my way with a quite useful module myself. This will take a week or two, as I want to clean up the code a bit - it was used internally for now. It will allow

[AOLSERVER] NTPL on Linux

2002-09-23 Thread Wojciech Kocjan
Hi. I've just read some text about Ulrich Drepper's new implementation of posix threads on Linux. It's not stable, but still did anyone test it? I read it can start and stop 100k threads in 2 seconds on an x86 box. It requires 2.5.36 kernel, glibc 2.3 beta and gcc 3.2, so I can't test it on any

[AOLSERVER] Potential problems using open |?

2002-09-07 Thread Wojciech Kocjan
Hi. Our company runs one AOLserver instance which is mainly used (almost no HTTP requests) for handling email messages. We want to use mks_vir (a virus software very popular in Poland), which we would use doing set handle [open |mks32 --filelist-on-stdin a+] and then send the actual filename

[AOLSERVER] Ns_TclEnterSet() question

2002-08-19 Thread Wojciech Kocjan
Hello. I'm writing a C-Tcl application, where I'd like to exchange data from C to Tcl. I want to have some sets, which will store session data (actually, not exactly, but close :). I want to store them in C, but sometimes make them acccessible from Tcl - for connection time. Which flags should

[AOLSERVER] If anybody's interested - AOLserver/3.4.2-dq4 available for download

2002-08-15 Thread Wojciech Kocjan
Hello. If anybody's interested, my company has finally produced an usable version of AOLserver, based on 3.4.2. The version includes: - Tcl 8.3.4 (many thanks to Zoran Vasiljevic) - tclsock.patch - allows writing mulithreaded tcp daemons - tclsock.patch bugfix, which caused SEGV when a detached

Re: [AOLSERVER] 28,000 hits per second, how many servers of what kind again?

2002-08-09 Thread Wojciech Kocjan
Peter M. Jansson wrote: The big secret to tuning AOLserver is that there isn't much to tune. There's minimal gain to be made by increasing the transmission buffer sizes in nssock, and you can play with the MaxThreads, increasing it until contention begins to dominate your timing. I've

Re: [AOLSERVER] file upload vulnerability in AOLserver

2002-08-09 Thread Wojciech Kocjan
Tom Jackson wrote: Details, including potential replacement functions which block the vulnerability can be found under http://zmbh.com/aolserver-vulnerability/ Have you (or anyone) tested it for potential incompatibility and/or problems? -- WK Data typing is an illusion. Everything is a

Re: [AOLSERVER] New module for AOLServer : share TCL channels across interpreters

2002-07-17 Thread Wojciech Kocjan
Jean-Fabrice RABAUTE wrote: This module allows you to open a channel (socket or file) and detach it to the current interpreter that it becomes global and can be used with all the scripts. [cut] So I can do ns_thread begindetached, then do socket -server ... (not the ns_socklistencallback)

Re: [AOLSERVER] Prospective user needs a nudge in the right direction

2002-07-04 Thread Wojciech Kocjan
Glen Lee Edwards wrote: I've been using Apache but am shopping around. I have several IP addresses on one machine. Can I install AOL server for testing purposes, and run it concurrently with Apache, but bind it to listen to an IP address that Apache isn't listening to? Yes. Use Listen with

Re: [AOLSERVER] Virtual Hosting in AOLserver

2002-05-13 Thread Wojciech Kocjan
You might want to use my module: http://www.nsstuff.zoro.tcl.pl/project.h2x?pr=nssmartvh I remember it had no docs some time ago, but now I fixed the problem. ÕÅÏþº£ wrote: Hi,all, I want to install another website to my aolserver. How can i config the sample-config.tcl in my aolserver and

Re: [AOLSERVER] AOLServer corrupting Form data

2002-05-10 Thread Wojciech Kocjan
Hello. I have the same problem here in Poland. I wrote a quickhack that does the trick in C. It creates ns_utf8 Tcl command which I use to convert from external to utf and back. I use this way: Instead of set text [ns_queryget text] I use set text [ns_utf8 eu [ns_queryget text]] Now it

Re: [AOLSERVER] nsv API in C ?

2002-05-04 Thread Wojciech Kocjan
You should use the following: static int BB_NsvSet(const char *nsvString, const char *keyString, const char *valueString) { Tcl_Obj *o[4]; o[0]=Tcl_NewStringObj(nsv_set,7); o[1]=Tcl_NewStringObj(nsvString,-1); o[2]=Tcl_NewStringObj(keyString,-1);

[AOLSERVER] ns/server/${server}/tcl - statlevel

2002-04-26 Thread Wojciech Kocjan
Hello. I've been wondering if someone uses 'statlevel' on development machines and if it's stable. I had some problems running it - SEGVs from time to time, mostly when using upvar - but still it was nice to have some statistics about command usage... Anyone had any experiences with statlevel?

Re: [AOLSERVER] libtbcload question

2002-04-25 Thread Wojciech Kocjan
I wrote znamespace.tcl which replaces _ns_getinit. It's efficient especially if most of your modules are to be bytecompiled. I noticed about 5% gain in speed when testing with ab. You also might want to write a wrapper function tbcload::bceval to rename itself, load tbcload.so and call

Re: [AOLSERVER] metakit with aolserver

2002-04-01 Thread Wojciech Kocjan
Maybe for now you should try the following code: proc req_mk4tcl {} { if {[lsearch [info loaded] *mk4tcl.so*]0} { load /usr/local/aolserver/lib/mk4tcl.so } } And then you can load 'plain' Tcl extensions. Just put req_mk4tcl before any of your code that uses metakit. This is

[AOLSERVER] nsprofile

2002-03-31 Thread Wojciech Kocjan
Hello. I tried compiling nsprofile-initial, and it crashes endlessly. I wonder if it's a problem that it passes ClientData to Tcl_CreateCommand(), which is freed when deleting an interp. I added several Ns_Log() calls and it seems to get corrupted data for the deletion function. Any ideas why?

Re: [AOLSERVER] server reload function

2002-03-11 Thread Wojciech Kocjan
You shouldn't rely on server not being restarted - if you for example need to reboot or need to reload AOLserver for other reasons. If you use C, you need to use Ns_RegisterAtExit(), and in Tcl use ns_atshutdown. Besides just for being more secure you should save your current data from time to

[AOLSERVER] good freeware benchmarking tool?

2002-03-05 Thread Wojciech Kocjan
I was wondering if any of you know of a good benchmarking tool? I used ab but it sometimes makes big problems with AOLserver - hard to say why, but I often get 'aborted after 10 failures'... I tries siege but it SEGV'ed after about 2 seconds - and I even looked at the README :) Is there good

[AOLSERVER] ANN: nssmartvh 2.1

2002-03-03 Thread Wojciech Kocjan
Hello everyone. I just wanted to announce that nssmartvh 2.1 is available for download from http://nsstuff.zoro.tcl.pl/ It now features short HTML docs by Dean Baender and me. -- WK

Re: [AOLSERVER] are nsv_* functions freeing memory ?

2002-02-18 Thread Wojciech Kocjan
This does not make much sense. I called these from nscp: time {nsv_set a b c; nsv_unset a b} 100 for {set i 0} {$i10} {incr i} {nsv_set a b$i c; nsv_unset a b$i} Both of these resulted in nsd processes having the same number of memory as before. I hope this helps a bit :) -- WK

Re: [AOLSERVER] Tcl profiling

2002-02-10 Thread Wojciech Kocjan
Yeap. I thought of using parts of TclX, but it seemed hard to understand exactly what it does :) I understood that it substitutes the command with something from TclX, which calls the command and gets the times. But the code seemed a bit ... unreadable - too much functions for me :) -- WK Jim

Re: [AOLSERVER] Newbie question: virtual host config confusion

2002-02-09 Thread Wojciech Kocjan
Dean Baender wrote: 3. nssmartvh-2.0 ( ) Building nssmartvh-2.0 gives a compiler warning from nssmartvh.c that 'control reaches end of non-void function' in funct 'NsSmartVhCmd'. Not a big deal, just thougth I'd note it. It never bugged me and I guess I didn't pay too much

[AOLSERVER] ns_adp_mime

2002-02-09 Thread Wojciech Kocjan
Hello. I've been wondering if ns_adp_mime should work this way: index.adp: % ns_adp_mime text/plain % And then I should get text/plain content. Since I'm not getting it ;) -- WK

Re: [AOLSERVER] ns_adp_mime

2002-02-09 Thread Wojciech Kocjan
Ok, it's ns_adp_mimetype ;) I guess I grepped it wrong since it's undocumented ;) I'll have to browse through nsd/tclcmds.c, there'll probably be a lot more :) Wojciech Kocjan wrote: Hello. I've been wondering if ns_adp_mime should work this way: index.adp: % ns_adp_mime text/plain

[AOLSERVER] Tcl profiling

2002-02-09 Thread Wojciech Kocjan
Hello. I've read a bit of the AOLserver sources again. I've been wondering if someone has used TclX's profiling code in AOLserver. I've read a bit on ns_stats but this is not what I want - TclX measures CPU time as well, which is what I want most. -- WK

[AOLSERVER] ns_atclose not working?

2002-02-03 Thread Wojciech Kocjan
Hello. I've tested ns_atclose on 2 machines. I tried % ns_atclose {close [open /tmp/xxx w]} % It does not report any errors, however it does not create /tmp/xxx as well :(. From what I understand from the docs, it can be called from ie ADP to set up things that should be done after closing

Re: [AOLSERVER] ns_atclose not working?

2002-02-03 Thread Wojciech Kocjan
to call it from ADP files - not to mention the fact that in modules/tcl/form.tcl ns_atclose is called from a function that *can* be called from ADP pages. -- WK Wojciech Kocjan wrote: Hello. I've tested ns_atclose on 2 machines. I tried % ns_atclose {close [open /tmp/xxx w]} % It does

[AOLSERVER] Bugs in ns_dbquotevalue

2002-01-28 Thread Wojciech Kocjan
Hello. Here is what caused problems for me with both mySQL and PostgreSQL: ns_dblist $h "SELECT lower([ns_dbquotevalue {ABC'DEF\'}])" Basically it quoted the string into 'ABC''DEF\'', which is not correct. Also, it does not work correctly for UTF-escapable characters. proc ns_dbquotevalue

Re: [AOLSERVER] Host-Header based Virtual Hosting

2002-01-23 Thread Wojciech Kocjan
Try my nssmartvh module - www.nsstuff.zoro.tcl.pl. It should be what you're looking for - you make a file with directory mappings - if it's not there, DocumentRoot from the config is taken. Owen Ferguson wrote: Hi everybody, I'm trying to install AOLServer and want to use it in a way

Re: [AOLSERVER] Porting (aol 2.2 to aol 3.3.1)

2002-01-23 Thread Wojciech Kocjan
I don't know 2.x api but doing Ns_DbBindRow(dbh[0]) might help... David Valentine wrote: I don't know if this is a porting problem, or a c problem. Old server was on a Dec Alpha. Recompiled code is on We have some old code I'm moving up to the latest AOLserver. The old code is trying to

Re: [AOLSERVER] script timeout

2002-01-10 Thread Wojciech Kocjan
The problem is that even if you close the conn, the Tcl interp will go on doing whatever it is doing... Can a thread be forcibly removed by pthread? :) If so, some thread could do that via filters - a queue of what to remove from the system. The problem would be the Tcl interp associated with a

[AOLSERVER] Sharing a socket between C and TCL

2002-01-07 Thread Wojciech Kocjan
Hello. I've written a small C based daemon listening on 999 port. It doesn't do much, but I want to move some of the functions from C to TCL. I'm using Ns_SockListenCallback() and have SOCKET to work with. How do I allow Tcl to use this socket? -- WK

Re: [AOLSERVER] And if you thought nsvhr was an inefficient virtual hosting mechanism...

2002-01-07 Thread Wojciech Kocjan
This is a small ab test on VMware 3.0 on Windows on P3/850 and a P3/600: Server Software:AOLserver/3.4 -- this is the P3/600 Server Hostname:www.zoro.tcl.pl Server Port:80 Document Path: /ab/ab.adp Document Length:12 bytes Concurrency Level:

[AOLSERVER] 64k query limit?

2002-01-06 Thread Wojciech Kocjan
Hello. I've hit a major problem. I want to send base64 encoded files through HTTP - the files are from 100 to 10 bytes. When uploading a 80k file, I occured this problem: [06/Jan/2002:20:20:22][1030.19474][-conn1-] Warning: conn: post size 123377 exceeds maxpost limit of 65536 The files

Re: [AOLSERVER] 64k query limit?

2002-01-06 Thread Wojciech Kocjan
Yeap, grepped it a minute after posting this one. Mentioned in doc/config.txt or something :) But thanks anyway Jim Wilcoxson wrote: Do this: ns_section ns/server/${servername} ns_param maxpost 131072;# Max bytes on a POST Jim Hello. I've hit a major problem. I want to

Re: [AOLSERVER] 64k query limit?

2002-01-06 Thread Wojciech Kocjan
Hmmm. I could use an example - the current system works fine with base64, but I will be writing v2 (incompatible with v1, of course :) and could use multipart... -- WK Mike Hoegeman wrote: if you use mime multi-part posts to upload files, you should not have the problem above (if i remember

Re: [AOLSERVER] Dynamic graphing with AOLServer

2002-01-04 Thread Wojciech Kocjan
I use nsgd - it's a port of gdtclft. It renders PNG files, but for noone complains about it - I'd be happier with GIFs, but what the hell. And a good advice, unless you really need to render these graphs every time a user hits your page, make a ns_register_proc and use files for storing graphs

Re: [AOLSERVER] session and url tracking - just a weird thought

2001-12-27 Thread Wojciech Kocjan
in everything is no fun, especially static html. You do need a cookie along with this method or you are vulnerable to session highjacking. dave On Thu, 27 Dec 2001, Wojciech Kocjan wrote: I realize that this idea is quite weird and probably useless, but what if sessions on AOLserver would

Re: [AOLSERVER] session and url tracking - just a weird thought

2001-12-27 Thread Wojciech Kocjan
... Haven't tried it. Peter M. Jansson wrote: On Thu, 27 Dec 2001, Wojciech Kocjan wrote: First of all, why do I need cookie? My SIDs are 32bytes long so guessing it could be a bit of a PITA. And if someone would sniff the SID, he could set his browser's cookies to send this SID. So I don't

Re: [AOLSERVER] session and url tracking - just a weird thought

2001-12-27 Thread Wojciech Kocjan
, Wojciech Kocjan [EMAIL PROTECTED] wrote: I think that anything the user supplies cannot be trusted and as such sessions are a real problem to make secure. What about using using symmetric key crypto to encrypt a sequence number that gets stored along with the session ID on the client's machine

[AOLSERVER] session and url tracking - just a weird thought

2001-12-26 Thread Wojciech Kocjan
Hello. I realize that this idea is quite weird and probably useless, but what if sessions on AOLserver would be implemented in this weird way: / created/gets (cookie - if available) a SID and redirects to /ssn0123456789abcde/index.adp which is the real page from documentroot this way, tracking

Re: [AOLSERVER] nssession reference implementation available

2001-12-23 Thread Wojciech Kocjan
I've written my own nsession module in C, it uses files as well and handles logins - this is what I needed for my personalization mechanism - when a user logs in, his sid changes to what is currently stored in this user's db, when he logs out, he gets a new sid. This mechanism works for me with

Re: [AOLSERVER] nssession reference implementation available

2001-12-23 Thread Wojciech Kocjan
Dossy wrote: On 2001.12.23, Wojciech Kocjan [EMAIL PROTECTED] wrote: I've written my own nsession module in C, it uses files as well and handles logins - this is what I needed for my personalization mechanism My reference implementation of nssession should be close to handling logins. I

Re: [AOLSERVER] nssession reference implementation available

2001-12-23 Thread Wojciech Kocjan
Dossy wrote: On 2001.12.23, Wojciech Kocjan [EMAIL PROTECTED] wrote: Ok, I'll explain how I do it currently with mod_dtcl in detail: Neat. I've implemented mine very similiarly to yours. Great. No merging when users log in, and logout just expires the session ID cookie. I call mine UID

Re: [AOLSERVER] nssession reference implementation available

2001-12-23 Thread Wojciech Kocjan
Dossy wrote: On 2001.12.23, Wojciech Kocjan [EMAIL PROTECTED] wrote: Hmmm. When a user logs in, he gets a new cookie with a new SID. So both of them send the same SID and both of them will have the same session settings/data. This shouldn't be a problem. I want to implement nsession eval

Re: [AOLSERVER] nssession reference implementation available

2001-12-23 Thread Wojciech Kocjan
Hmmm. I put up my 3 interesting packages: www.nsstuff.zoro.tcl.pl (nice domain - a better one is www.nsstuff.nsession.zoro.tcl.pl) These domains are just a nice trick done by nssmartvh :) Wojciech Kocjan wrote: Dossy wrote: On 2001.12.23, Wojciech Kocjan [EMAIL PROTECTED] wrote: Hmmm

[AOLSERVER] client/server software with AOLserver

2001-12-20 Thread Wojciech Kocjan
Hello. I've been writing a nice and easy to use DB module. The webpages side works fine, but I want to write a client-server software for editing tables. I want to know if anyone's used AOLserver for server with Tcl/Tk for client and which technology should I use? I once noticed a project to

  1   2   >