Re: [AOLSERVER] Controlling perms on files written to by AOLserver

2004-02-24 Thread Peter M. Jansson
On Tue, 24 Feb 2004, Janine Sisk wrote:

 We're using daemontools.  I've put the umask command in the run script
 but it didn't help.

Is it possible that the umask command is not being executed in the process
that's the parent of nsd?  For example, if the umask command is executed
in a separate shell, then it won't affect the parent process, and would
not, then, affect the nsd.


--
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] Modifying client IP prior to writing in access log

2004-02-02 Thread Peter M. Jansson
On Mon, 2 Feb 2004, Doug Harris wrote:

 I've identified where in nslog/nslog.c the necessary change would be made
 to write the value of this header rather than NsConnPeer(conn), but before
 I make the change, test, etc. I thought there might be an easier way that
 I'm overlooking.

I think someone made this change once before, but then backed it out when
someone pointed out that it's easy to forge the header and skew the
tracking results.  Most proxies don't do any kinds of hashes or signatures
on this data that one could use to verify their authenticity.  This may
not be an issue if you can tolerate the risk that someone might inject
bogus request address information into your logs.

Make sure your change does the right thing if the header is missing, too.

Pete.


--
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] Running different virtual servers as different users

2003-11-26 Thread Peter M. Jansson
On Wed, 26 Nov 2003, Joshua Ginsberg wrote:

 And since nsd.tcl is interpreted, I can pull the config information
 from a database.

There's a problem here...the ns_db module isn't loaded when you'd need it,
so you can't for example, use it to figure out which virtual servers are
run by this AOLserver instance.  You could run an external program to
fetch the data from the database; you might even be able to load a
non-AOLserver database driver and get the results that way (I believe that
the interpreter used for nsd.tcl is discarded after use).


--
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] Running different virtual servers as different users

2003-11-24 Thread Peter M. Jansson
On Mon, 24 Nov 2003, Joshua Ginsberg wrote:


 I thought/hoped AOLServer worked in a similar manner.

Nope.  Doesn't.  Sorry.

 Since each virtual
 server doesn't appear to share the same memory space

No, they don't.

 (e.g. independent nsv
 buckets)

Having independent buckets doen't imply different memory space, any more
than threads having separate stacks implies different memory space.

 I thought/hoped AOLServer ran a separate process for each virtual
 server and threaded within those processes.

Nope.  Sorry.

 From your response, it seems that you're implying that all AOLServer virtual
 servers run within the same process. Is that the case?

Yes.

I'm hoping I'm being less ambiguous here, so this one won't earn a Duh,
too.


--
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] Running different virtual servers as different users

2003-11-24 Thread Peter M. Jansson
On Mon, 24 Nov 2003, Andrew Piskorski wrote:

 I'm not familiar with how Apache's perchild MPM works, but from your
 description it sounds like Apache has some syntactic sugar to
 accomplish the exact same thing, using one Apache as the front end.

Just for reference, syntactic sugar doesn't do justice to what the
Apache team has accomplished.  It's a deeper implementation than that.
Essentially, they've taken the choices of processes, threads and UIDs, and
implemented most of the entries in the matrices, all under control of the
main httpd process.  It's not just shell scripts to fake it; it's done
programmatically, using the same scheduling and balancing tools that you
use to control any one server.


--
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] Running different virtual servers as different users

2003-11-24 Thread Peter M. Jansson
On Mon, 24 Nov 2003, Bas Scheffers wrote:

 Peter M. Jansson said:
  Just for reference, syntactic sugar doesn't do justice to what the
  Apache team has accomplished.  It's a deeper implementation than that.
 It probably is, but it has one _big_ problem compared to AOLserver when
 used with a scripting language like PHP. They are independent processes,

If you use the worker MPM, you only have independent processes if you
specify them, and you do not have to specify them.  With the worker MPM,
you can run 1 process with 20 or 30 threads, which is similar in concept
(although not execution) to AOLserver.

Now, whether other scripting languages can work in the worker MPM is a
separate question.  As I understood it, the current PHP can (so it should
be able to share database handles, for example), and a development version
of mod_perl can, although it's not considered safe for production use.


--
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] Running different virtual servers as different users

2003-11-23 Thread Peter M. Jansson
On Sat, 22 Nov 2003, Joshua Ginsberg wrote:

 I'd like to be able to have different virtual servers running with the
 permissions of different users. Is this possible?

Only possible if you use separate instances (and therefore processes) for
the virtual servers.

If you're hosting a bunch of sites, and you can limit dynamic content to
CGI, you can use something like CGIWrap to do this, but there's no way to
have a single process with separate Tcl scripts running under separate
UIDs.


--
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] Lengthy tcl interp initialization

2003-08-15 Thread Peter M. Jansson
On Fri, 15 Aug 2003, Elizabeth Thomas wrote:

 We are currently pursuing a very encouraging approach of adding an
 optional 'lazy proc definition' capability, capitalizing on the
 'unknown' processing of tcl. (Thanks to Jeff Hobbes for putting us on
 this path). Since most of our threads use a relatively small subset of
 all available procs, we hope to achieve significant performance and
 memory consumption wins by only loading procs in the interpeter that are
 actually needed.

An approach like this was discussed on this list a couple of years ago,
and Rob Mayoff had particular suggestions for handling namespaces.  At the
time, if I recall, some AOLserver mods were necessary to support proper
handlikng of namespaces, but those are probably obsolete now.  Also, at
the time, Jim felt the approach was not necessary for AOL, so it didn't
make it into the default thread initialization.

The old notes are probably in the list archives.

Pete.


--
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] Are the weekly chats officially dead?

2003-08-01 Thread Peter M. Jansson
 Compatibility with common apache features would go a long way
 towards wider adoption of AS

Unless it would speed migration away from AOLserver.


--
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] apache compatibility (was: Are the weekly chats officially dead?)

2003-08-01 Thread Peter M. Jansson
 the problem isn't
 that the functionality is missing, its not knowning syntax.

Patrick's case is that he wants to use a 3rd-party package that requires
Apache semantics, and it's not a matter of his knowing the syntax,
(which he probably does anyway), but it's that the 3rd-party packages do
automated things with the .htaccess files and expect them to work.

What would be helpful would be to collect a list of .htaccess directives
that such packages use, so we could figure out how to support them.


--
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] Are the weekly chats officially dead?

2003-07-31 Thread Peter M. Jansson
On Thu, 31 Jul 2003, Dossy wrote:

  2: full emulation of mod_rewrite and .htaccess files

 I know this isn't what you want to hear, but ... if you want Apache,
 then run Apache.  :-)

I'm in strong agreement.  There's a lot in .htaccess that's fundamental
Apache architecture (AddHandler in a .htaccess file, for example -- that
just won't work with AOLserver as it stands, and the changes would go a
long way toward turning it into Apache).  Now, if all you really want is
perms stuff, that's more manageable, but still requires a new perms module
in AOLserver.  mod_rewrite I imagine could be done, but could probably be
done as easily in a filter.


--
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] Are the weekly chats officially dead?

2003-07-31 Thread Peter M. Jansson
On Thu, 31 Jul 2003, Patrick Spence wrote:

 Using filters is easy enough, I did it when I ran AS.. but I am running
 some third party stuff that is made more capable/powerful with mod_rewrite
 and .htaccess... and some other software that requires .htaccess so it
 makes it easier to work with...  in other words its not the functionality
 that is already there in other ways, but the compatibility that I need.

Fair enough.  I think it's possible to write a mod_rewrite emulation
layer, but I'm very skeptical about .htaccess, unless it's a limited
subset.  What .htaccess directives are used?  As I wrote earlier,
completely supporting every possible .htaccess directive would require a
lot of work and would fundamentally change the way AOLserver works.


--
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] Personal Certificate

2003-07-23 Thread Peter M. Jansson
 Ok, I haven't figured out which of the following did it, but
 applying the following suggested changes to my config.tcl
 fixed the problem:

 ns_param ServerProtocols SSLv2

That was it.  You told the server not to support client-side certs at
all -- that's an SSL v3 thing (and TLS v1).  You've also disabled other
SSL v3 functionality, and I think that v2 has security exposures that
allow the information being exchanged to be captured, which was one of
the major motivations for moving from v2 to v3.


--
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] Personal Certificate

2003-07-21 Thread Peter M. Jansson
On Mon, 21 Jul 2003, Barry Books wrote:

 Have you tried Safari 1.0? I've had SSL problems on my Mac also but for the
 most part they seem to be fixed since I upgraded. I don't know if it
 supports personal certificates though, but if you mean self signed I think
 you can now access sites with invalid certificates.

Personal certs are different from self-signed certs (well, you can have a
self-signed personal cert, if you like).  Safari does not appear to
support them, which is a bummer because I have an app that does
authentication with personal certs, and I can't use Safari for that app.


--
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] sqlite and AOLserver

2003-06-07 Thread Peter M. Jansson
On Saturday, June 7, 2003, at 09:39 AM, Wojciech Kocjan wrote:

If noone has tried to write sqlite driver for nsdb, then where can I
read more on how to write one myself? sqlite api seems pretty
straightforward.
This is a good candidate for an external driver, which would guarantee
that no more than a single thread (and process, for that matter) is using
the SQLite API at a time, while still making concurrent connections
available through AOLserver.  Look at the Sybase driver for guidance.
With the current implementation of the external driver protocol, don't run
the external proxy in remote mode -- only use it on the local machine so
it connects by pipes, because the latency of an actual TCP connection is
too high for the protocol being used.
Pete.

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Run two instances of aolserver 3

2003-06-02 Thread Peter M. Jansson
On Sunday, June 1, 2003, at 12:11 PM, Tom Brown wrote:

The second instance server log says the server failed at nscp on port
.
The first instance already grabbed port . Turning off nscp in the
second instance allowed the second server to start but left me without a
control port -- even though I've not yet tried using one. So I upped the
nscp port on the second instance to 1. The second instance boots fine
there.
You should understand that you're seeing normal behavior here.  The
control port is a server, just like the HTTP port, and you can only have
one process listening on a given IP address and port combo, so just as you
had to move the HTTP port on the dev server, you're also going to have to
move its control port, or just run without the control port by not
including nscp in your modules configuration for the server.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] CGI Memory Leak - AOLserver 3.x - *IMPORTANT*

2003-04-04 Thread Peter M. Jansson
On Fri, 4 Apr 2003, Scott Goodwin wrote:

 The leak has been fixed in the CVS tree for AOLserver 3 (3.5 branch).

Nice work, Scott!


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Bug in tclhttp.c

2003-03-28 Thread Peter M. Jansson
Hey Alfred,

How about using the Tcl wrapper and writing an AOLserver module to add curl
support?  I'm sure the core team would love a patch.  You could verify the
thread-safety claims.  I'm sure the community would appreciate your work.

Pete.

 Has anyone on the aolserver core team taken a look at libcurl?
 http://curl.haxx.se

 They claim to be thread safe...

 There is a TCL wrapper at
 http://personal1.iddeo.es/andresgarci/tclcurl/english/

 Doubtless this is old news to many, but it seems like it has so much to
 offer :)

 jab The TCL native and Aolserver HTTP implementations just seem
 to be far behind what this has and all my PHP buddies get to use it as a
 builtin :-) /jab


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] ns_register_proc

2003-03-28 Thread Peter M. Jansson
 Why can't we just use POSIX regular expressions for all of
 the ns_register* procedures?

I'd be concerned about REs degrading performance.  REs are usually
significantly slower than glob matches, and the registered proc matcher will
be called a _lot_.


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Database handles not being released in 4.0

2003-03-27 Thread Peter M. Jansson
On Wednesday, March 26, 2003, at 10:15 PM, paul cannon wrote:

So http://aolserver.com/docs/devel/tcl/api/db.html is at best
misleading:
ns_db releasehandle puts the handle back in the pool. When your
operation has finished running, the server will automatically return
any handles to their pools, so you don't normally have to call this
function.
I may have misunderstood the meaning of operation.
No, I think you have it right. I never noticed this, and I just checked
and it was in the 2.x docs.  That'll teach me not to read the docs
carefully enough.
In my opinion, it's a bug. You should file it in SourceForge.

At this point, I think my superstition about not trusting AOLserver to
clean up the handles is probably still appropriate.
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Fwd: AOLServer 4

2003-03-27 Thread Peter M. Jansson
On Thursday, March 27, 2003, at 02:22 AM, Andrey Chichak wrote:

I want migrate from apache+php to aolserver+python :o)
Do you know about PyWX?

   http://pywx.idyll.org/

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Database handles not being released in 4.0

2003-03-26 Thread Peter M. Jansson
On Wednesday, March 26, 2003, at 07:59 PM, paul cannon wrote:

It seems that when a database handle is allocated in an ADP page and not
explicitly released, AOLserver no longer releases it automatically.
Is this true? If so, I can't find any documentation anywhere that would
suggest this is the case.
Way back in the 2.x days, I moved an app from Illlustra to Sybase, only to
discover that the automatic handle cleanup that happened in Illustra wasn'
t happening in Sybase.  MarkD helped get that working for Sybase, and I
learned that automatic handle cleanup was, in the 2.x days,
database-driver-dependent.
I think the bottom line is that there is not documentation that says
AOLserver will clean up database handles that aren't explicitly released,
so you should not depend on the feature.
catch is your friend.  Also, this is one of the things about the current
adp processing model that's nice, because you can have a script chunk at
the end of the page that says if the variable that holds the handle is
non-empty, release it, and it will be executed, even if script chunks
earlier in the page up-and-die.
Pete.

--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Connecting to two different versions of Oracle

2003-03-25 Thread Peter M. Jansson
Another way to do this would be to use an external driver instead of an
internal one.  Then each external driver instance can have its own
instance.  The current external driver has performance issues if the
AOLserver connects to the proxy using TCP, but as long as the connection
is via pipes (the default for a local proxy) the performance is decent.
I don't know if there is an external flavor of the Oracle driver, though.

On Tuesday, March 25, 2003, at 07:54 AM, Oscar Bonilla wrote:

What I have in mind is being able to tell the oracle
driver
from the nsd.tcl config file how it should set the environment
variables


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] Nesting ns_db select

2003-03-15 Thread Peter M. Jansson
On Sat, 15 Mar 2003, Jeremy Cowgar wrote:

 set classes [ns_db select $dbh SELECT * FROM classes]
 while {[ns_db getrow $dbh $classes]} {
   ns_puts trtdClass: .../td/tr
   set students [ns_db select $dbh \
 SELECT * FROM students WHERE cid='[ns_set value $classes id]']
   while {[ns_db getrow $dbh $students]{ {
 ns_puts trtdStudent.../td/tr
   }
 }

Don't do this.  Use a join:

set students [ns_db select $dbh \
select c.*, s.* from classes c, students s where s.cid = c.id]
set lastclass 
while {[ns_db getrow $dbh $students]} {
if {![string match $lastclass [ns_set get $students cid]]} {
ns_puts trtdClass:.../td/tr
set lastclass [ns_set get $students cid]
}
ns_puts trtdStudent.../td/tr
}


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] ADP: are if's possible?

2003-03-15 Thread Peter M. Jansson
On Sat, 15 Mar 2003, Jeremy Cowgar wrote:

 I'm certian that if you could have the ability to execute HTML inside of a if
 statement that you would also have the ability to do it the old way as well.

A lot of people really want to try to turn ADP into either JSP or ASP.  It
doesn't have to be that way.  We could make it so it's just another ASP
clone, but there are advantages to the way it works.  I've shown code that
solves the conditional and looping constructs without needing to break an
ADP code tag across an HTML fragment (search for remember and recall in
the mail archives), so there's at least one paradigm that's different than
ASP that can solve the same problem.  It's worth the effort not to get
trapped in one paradigm.


--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list: http://www.aolserver.com/listserv.html
List information and options: http://listserv.aol.com/


Re: [AOLSERVER] MySQL and 4.0?

2003-03-14 Thread Peter M. Jansson
on 3/14/03 1:30 PM, Jeremy Cowgar at [EMAIL PROTECTED] wrote:

 Is their a mysql module that works with 4.0? The postgres one works great, but
 for speed concerns and the simplistic data I am storing, I think mysql would
 be a better choice.

For those reasons, I'd stick with PostgreSQL, especially since you already
have it working.  PostgreSQL isn't much slower than MySQL for smaller
datasets, and can be faster for larger ones.



I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:

signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


Re: [AOLSERVER] AS 4.0 (beta 2) running on privledge port

2003-03-06 Thread Peter M. Jansson
4.0b2 on RH8, at the moment, but it was a customized 6.2 up until last
Wednesday, all with the -b running.  My nssock is global, and here's its
config:
ns_section ns/module/nssock
ns_param   port$httpport
ns_param   hostname$hostname
ns_param   address $address
Where I've previously done:

set httpport 80
set hostname somehostname
set address 192.168.1.239
If you don't set the address in the nssock config, it might use INADDR_ANY
as the default, and if you don't prebind to all addresses (including the
loopback), you would probably get permission failures binding to the port.
On Thursday, March 6, 2003, at 10:47 AM, Brett Schwarz wrote:

Hummm, I have tried it on 2 different machines now, and it still does
not work...even with the -b option. I have tried other ports as well
(i.e. 81, 82, etc).
What version of 4.0 do you have (i.e. beta 1, beta 2, cvs)?

I tried the same with 3.5.1, and that worked.

I am on SuSE Linux 7.3, if that matters at all.

Humm, I guess I need to do some more digging...

Thanks,

   --brett

On Wed, 2003-03-05 at 17:24, Peter M. Jansson wrote:
On Wednesday, March 5, 2003, at 07:20 PM, Brett Schwarz wrote:

However, NsPreBind does
nothing is the -b or -B option are not given, when, I believe it should
pre bind anyways from what is given in the config file. I could be wrong
here.
My inittab line:

ww:345:respawn:/usr/local/aolserver-4.0/bin/nsd -i -b 192.168.1.239:80 -u
web -g web -t /usr/local/aolserver-4.0/click.tcl
You must specify the -b on the command line,  It does work.



I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/
--
Brett Schwarz
brett_schwarz AT yahoo.com


I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


[AOLSERVER] nsopenssl 2.1 allergic to RedHat 8.0?

2003-03-05 Thread Peter M. Jansson
I updated one of my systems to RH 8.0, and then updated OpenSSL to 0.9.7,
and now I'm having trouble compiling nsopenssl 2.1 from the tarball on
ScottG's site.  Anyone else have similar troubles?  I'm digging in to try
to figure it out, but I thought I'd ask the crew, in case someone else has
an answer.
One difference is that OpenSSL 0.9.6 appears to define a symbol THREADS
to indicate that OpenSSL was built for threads, while OpenSSL 0.9.7
defines OPENSSL_THREADS, but that's easy enough to fix.  I'm guessing
most of my troubles are coming from a newer gcc being a little more
pedantic (which I didn't think was possible).
Thanks,
   Pete.


I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


Re: [AOLSERVER] AS 4.0 (beta 2) running on privledge port

2003-03-05 Thread Peter M. Jansson
On Wednesday, March 5, 2003, at 07:20 PM, Brett Schwarz wrote:

However, NsPreBind does
nothing is the -b or -B option are not given, when, I believe it should
pre bind anyways from what is given in the config file. I could be wrong
here.
My inittab line:

ww:345:respawn:/usr/local/aolserver-4.0/bin/nsd -i -b 192.168.1.239:80 -u
web -g web -t /usr/local/aolserver-4.0/click.tcl
You must specify the -b on the command line,  It does work.



I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


Re: [AOLSERVER] ns_register_filter problem: proc not found AOLserver HEAD

2003-03-03 Thread Peter M. Jansson
Sorry I didn't really read this sooner.  I've got a preauth filter in my
4.0b2 setup, and it's working fine.  I notice you declared your filter
with no arguments, but I declared mine with this:

proc some_filter { args } {

Maybe it doesn't like being declared as having no arguments?  Mine is
running on a RH 8.0 box.

Pete.

On Mon, 3 Mar 2003, Tim Moss wrote:

 We'll try this on our RH8.0 box tomorrow and will let you know the outcome
 ASAP.

  -Original Message-
  So I'm guessing noone else had this issue? Seems like filters are hosed.
  --Tom Jackson
 
  Tom Jackson wrote:
 
   I am running a minimum current checkout of AOLserver. My init.tcl file
   has the following:
  
   proc myfilter { } {
  ns_return 200 text/plain Hi there
  return filter_return
   }
  
   ns_register_filter preauth GET /* myfilter
  
   When I connect to / I get no return from the server at all, it just
   closes the connection. The error log shows
   that the proc myfilter is not found. (Also Mozilla on RH8.0 seems to try
   the connection 7 or so times because of the
   disconnect)



I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:

signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


Re: [AOLSERVER] Root-server switches from BIND to NSD.

2003-02-25 Thread Peter M. Jansson
On Tuesday, February 25, 2003, at 03:05 PM, Rob Mayoff wrote:

+-- On Feb 25, Dossy said:
Added bonus would be a web interface for viewing zones and editing
them, which would persist changes back down to the DBMS.
Note that a web interface to your DNS data doesn't require that
AOLserver respond to DNS requests.
Among others, there's a SourceForge project called BIND-DLZ in which BIND
serves records directly from a database, without needing zone files, and
without having to declare all your zones in a config file prior to startup,
 so you can add zones just by updating the database.  This would probably
be easier to use in concert with an AOLserver front end than trying to get
AOLserver to speak DNS correctly.  (DNS is not a trivial protocol.)
Now, better resolver support in AOLserver, allowing for concurrent
resolution requests -- that's worth doing!


I. To remove yourself from this list:

Send a message to [EMAIL PROTECTED]  with the following text in
the BODY of your message:
signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/


Re: [AOLSERVER] ns_register_filter problem

2003-02-17 Thread Peter M. Jansson
On Mon, 17 Feb 2003, Ross Simpson wrote:

 The problem with ns_register_proc is that it expects the requested file
 to exist -- something I don't want.

No it doesn't.



Re: [AOLSERVER] AOLServer4 nssock ?'s

2003-02-10 Thread Peter M. Jansson
You need to add to the command line a prebinding for the address and port on
which you want to listen.  For example, if you want to listen on port 80 of
10.0.0.1, add -b 10.0.0.1:80 to your startup command.

- Original Message -
From: Chris Goehring
To: [EMAIL PROTECTED]
Sent: Monday, February 10, 2003 7:05 AM
Subject: [AOLSERVER] AOLServer4 nssock ?'s


Hi,

I installed AOLServer 4 beta 1 and 2 on RH 7.3 machines.  With both versions
I am getting a permission denied when the nssock mod tries to listen on my
ip at port 80 or any other port for that matter.  I am running as a user who
at least with previous versions has been able to run.  Any ideas as to why
this is happening?

Any info would be awesome!

Chris



Re: [AOLSERVER] Fwd: AOLServer 4

2003-02-08 Thread Peter M. Jansson
On Sat, 8 Feb 2003, Nathan Folkman wrote:

 Can someone who has actually used these features help Chris out? Thanks!

 1.  Can you specify a document root for each host

Yes, and, in fact, you must.  Each virtual server is separate, and there
won't be any inheritence of features between them, so if you want a
virtual server to have a particular feature, you must explicitly enable
it.

 2.  Are all sourced Tcl files available to all hosts or can you
 limit this via config

Not necessarily.  Each virtual server gets its own Tcl interpreters. Any
Tcl you have in ${AOLSERVER_ROOT}/modules/tcl will be sourced by all
virtual servers, per the usual instructions (stuff in the dir is done
alphabetically; subdirs are only loaded if there is a ns_param subdir
Tcl in the modules section for the virtual).  Stuff in
${AOLSERVER_ROOT}/servers/$server/modules/tcl is strictly per-virtual
server.

 3.  Can you do name and ip based virtual hosting

Yes.  You can load the nssock module globally, which enables host-based
virtual servers.  Additionally, you can load nssock on a per-module basis
and nail a particular virtual server to a particular IP address.  I don't
believe you have a choice about which nssock instance gets the name-based
virtual servers; it's always the global one.

Scott, want to comment on nsopenssl?



Re: [AOLSERVER] mailman and aolserver

2003-02-02 Thread Peter M. Jansson
I think bug 230479 is the SCRIPT_NAME bug, although the aD QA entry it
cites is no longer visible, as it appears these archives were not moved to
RedHat.  The bug is currently assigned to kriston; I don't know how to
attach the bug to the beta group, but perhaps you can do it?

On Sunday, February 2, 2003, at 10:36 AM, Nathan Folkman wrote:



In a message dated 2/2/03 10:34:08 AM, [EMAIL PROTECTED] writes:



I have read on the Wikit Wiki that nscgi sets the SCRIPT_NAME variable
incorrectly, but the report did not include an instance of what it should
have been vs what it was, and no bug was filed on the AOLserver
SourceForge tracker, as far as I know.  I don't think anyone has a patch
for this.



If someone could please file a bug under the aolserver_v4_r0_beta_1 group
and we'll take a look.

- Nathan



Re: [AOLSERVER] Cold Fusion vs Tcl in AOLserver: Opinions

2003-01-30 Thread Peter M. Jansson
Scott,

I'll disclaim that I don't have direct ColdFusion experience, but assuming
that your developers are using the current CF runtime, and knowing that
the current CF Runtime is a J2EE container, I'm not sure how much good
news there is for you.  Both AOLserver and J2EE containers use a threading
model, and have database connection pools available, so AOLserver's usual
advantage is nullified here.  Back in the 2.3.3 days, AOLserver would have
commanded far less memory than other servers with embedded languages, but
because of the way AOLserver has handled Tcl initialization since 3.0,
AOLserver thread startup is actually quite heavyweight (either Jim W or
Dan S had horror stories about threads requiring many seconds to startup
because of the time required to initialize large amounts of Tcl code in
the libraries and modules). ADPs would normally be a good rapid
development tool with quick turnaround, but JSP offers very similar
functionality.  On top of that, nobody has any friendly AOLserver/Tcl/ADP
front-end design tools, whereas CF was an environment built around the
idea.  Depending on the complexity of your application, it's entirely
possible that the developers can get it going faster, and can deploy it on
comparable resources, and with comparable performance if they use CF
rather than AOLserver.  It is very hard to compete against an app
development environment like CF with it's front-end when we don't have
even a Dreamweaver behavior that makes life easier, and if you don't do
anything like I suggested recently regarding conditional and repeated
content, it's really hard to do dynamic page development in anything other
than a text editor.  Again, from an ease-of-use standpoint, AOLserver has
a hard time competing with CF.

Now, if the app tests the boundaries of CF, you start to get a fighting
chance with AOLserver, because AOLserver has finer-grained APIs, and you
can adapt an AOLserver to fit your problem, where, with CF, you'll end up
doing more fitting your problem to CF.  The problem remains, though, that
the CF environment is fairly rich, and unless you're going to OpenACS,
AOLserver lacks a lot of the richness (and even with OpenACS, you still
don't get friendly development tools -- I don't consider emacs a friendly
development tool).

If you're going to just try to have a shootout between AOLserver and CF, I
think you're going to lose, unless you can mold it to the problem, and
show how AOLserver can adapt better and quicker to your problem.

Pete.


On Thursday, January 30, 2003, at 03:44 PM, Scott Goodwin wrote:


Hi all,

can those of you with Cold Fusion experience please respond to me
directly with your opinions on Cold Fusion vs Tcl in AOLserver?

I need to make a case for moving a heavy Cold Fusion developer group to
Tcl in AOLserver. Specifically I need to convince this group that the
pain of the switch is worth it in the long run.

I don't need philosophical advice (e.g. Use what you know). I need
specific advice on why Tcl/AOLserver is a better solution than CF for
web apps.

Please reply to [EMAIL PROTECTED]

Thanks!

/s.



Re: [AOLSERVER] ns_mutex is likely causing our AOL web server to hung - Memory problem

2003-01-30 Thread Peter M. Jansson
On Thursday, January 30, 2003, at 07:58 PM, Seena Kasmai wrote:


Would some please be kind enough and assist me how to only upgrade my TCL
to 8.3.1 from my AOLserver/3.3.1+ad13 w/TCL 8.3 ??


For versions of AOLserver prior to 3.5, the Tcl implementation was tightly
tied to the AOLserver, and the only way to change the version of Tcl was
to use a different AOLserver version.  Given that you're using the
3.3.1+ad13 version of AOLserver, you're probably using OpenACS (or ACS
itself), and switching to AOLserver 3.5.2 is not possible.


Another issue that might be related (or may be not), is that I have
noticed, while the AOLServer is running, the memory keeps getting shrink
and eventually system runs out of memory and web serve dies. Initially
when AOLServer comes up, system has about 840MB memory. So far in about
every 24-hour period, the memory becomes under 16MB and eventually server
crashes (and memory gets back to 875MB). Here is a snap shot of TOP when
server starts up:


Seena, this behavior is not caused by a memory leak.  There is no leak
that serious in AOLserver.  Plenty of folks have had 3.3.1 systems that
take fair amounts of traffic and don't consume 800 MB of memory in 24
hours.  There is something in your application that is grabbing memory and
making it unavailable to the rest of the system.  Even though Tcl uses
garbage collection, Tcl can't GC memory that's being referenced (such as
in a Memoize cache).

Can you put some logging around your memoization to try to see what the
size of the memoize cache is?  Perhaps you could register a pre-auth trace
that captures the size of the memoize cache, and then register a trace
that computes the size again (after the request has run, because it's a
trace) and logs the difference?  If you could get a handle on whether one
request is particularly demanding on memory.

Even if you were able to update your Tcl, I think that, given the
magnitude of your memory issue, you would not see a meaningful improvement.

Pete.



Re: [AOLSERVER] ns_mutex is likely causing our AOL web server to hung - Memory problem

2003-01-30 Thread Peter M. Jansson
On Thursday, January 30, 2003, at 09:19 PM, Seena Kasmai wrote:


Well, the strange thing is we never see such a behavior on 2.3.3 w/TCL 7.
0, and we run 4 web server with the same code/application. That's why I
can't think of any code related issue.


It's been a long time since I've used 2.3.3, but I can't help but think
that there are some functions in 2.3.3 that are not compatible with 3.x,
so I don't think it's possible to pick up a 2.3.3 app (which was Tcl 7.6,
not Tcl 7.0) and run it directly on 3.x without some modifications.  (Well,
 no significant application, anyway.  OK, I'm sure there's a
counterexample out there somewhere.)


I did check the size of the cache array we use for Memoizing stuff, and
it's not that big at the time server is eating the memory. We were able
to re-create the problem in 20 Minutes just by clicking on various pages
(including TCL pages) and after we stop clicking the memory was kept
getting eaten like 2-3MB per seconds and then it stops for a while and
the starts again (while no activity), until it gets down to 16MB, and
then it uses the max swap file allowed until it dies.


That memory is going somewhere.  Perhaps not into the memoize cache; I
only pointed out that one because you identified it in your message.  I
would start generously sprinkling ns_log statements through one of the
execution paths taken by one of the pages you've identified, including
filters and traces.  One possibility is that some function call you made
under 2.3.3 is now failing, and the application is retrying the operation,
 which could cause a lot of activity, since the retries will not fail.

Is there database activity going on?  Perhaps if you turn on verbose SQL
logging, you'll see a pattern of queries that could point you to the
problem.


Anyhow, would you recommend to upgrade to 3.4.2 or 3.5.1 w/ TCL 8.3.1 ?


If you are using ACS and Oracle, or OpenACS, you must use a version of
AOLserver with arsDigita patches.  If you can upgrade, meaning that you
don't use any ACS stuff nor Oracle, then you want to use 3.5.1, and not 3.
4.2.  The 3.5.1 release will allow you to use Tcl 8.4, which is faster,
among other things, but the main thing is that with 3.5.1, if there's a
Tcl update, you can update Tcl without updating AOLserver.  So, if you do
not use ACS or OpenACS, nor Oracle, I suggest upgrading to AOLserver 3.5.1.

Again, given the pathological behavior you're reporting, I strongly doubt
the problem is something as subtle as a bug in Tcl.  I think such a bug
would not manifest itself so dramatically, unless it segfaulted
immediately.

Pete.



Re: [AOLSERVER] Cold Fusion vs Tcl in AOLserver: Opinions

2003-01-30 Thread Peter M. Jansson
On Thursday, January 30, 2003, at 09:37 PM, Dossy wrote:


As I said to Scott offlist, I did write a custom CFX tag, called
CFX_TCL, that lets you evaluate Tcl code from your CF app.  I'm going to
hell for it, I know ...


Time to rewrite it for JACL. :-)



Re: [AOLSERVER] Cold Fusion vs Tcl in AOLserver: Opinions

2003-01-30 Thread Peter M. Jansson
On Thursday, January 30, 2003, at 09:53 PM, Patrick Spence wrote:


but... I am not brave enough
to attempt hacking into dreamweavers extension setup yet


I'm a GoLive user, so I won't be much help here, either.



Re: [AOLSERVER] adp parsers and aolserver 4.0

2003-01-20 Thread Peter M. Jansson
On Mon, 20 Jan 2003, Patrick Spence wrote:

 I would love to have it as an option, since my foray into PHP under
 aolserver I have found that to be a very nice extension..
 that way I don't have to craft large chunks of html, convert all the
 quotes to backslash quotes and then ns_puts it all out..
 so I can then change that HTML with dreamweaver instead of having
 to to the create/convert/ns_puts route over and over

Life is way too short to code HTML by hand, but being able to break
the Tcl up makes the parser harder to write, and far less robust.

There's another way to do what you're trying to do: register an adp tag
that just holds the tag contents in a global var (this will all run in
the same thread, so globals are fine), then, in a  % %  later, do an
ns_adp_eval of the global you remembered.  If you need to remember
multiple chunks of stuff, use a global array instead of a global var,
and store/recall stuff by name.

It's easy to have large conditional blocks this way, and it's very
WYSIWYG-editor-friendly.



Re: [AOLSERVER] adp parsers and aolserver 4.0

2003-01-20 Thread Peter M. Jansson
Grrr.  I'm doing exactly those kinds of things.  Here's an example:

In adp_recall.tcl:

ns_register_adptag dnr_remember /dnr_remember dnr_adp_remember
proc dnr_adp_remember {input tagset} {
global _dnr_adp_memory
set tagname [ns_set iget $tagset name]
if {[string length $tagname]} {
set _dnr_adp_memory($tagname) $input
return 
} else {
return $input
}
}
proc dnr_adp_recall {name} {
global _dnr_adp_memory
if [info exists _dnr_adp_memory($name)] {
set parsecommand [list ns_adp_parse -string -local]
lappend parsecommand $_dnr_adp_memory($name)
ns_puts -nonewline [uplevel $parsecommand]
} else {
ns_log Error [ns_adp_argv 0]: Unable to recall adp
fragment \$name\
}
}

Then, I can do things like this, which is a conditional without an
include, and which is WYSIWYG-friendly:

dnr_remember name=login_failure
We were unable to complete your login. Please try again.
/dnr_remember
% if $login_failure { dnr_adp_recall login_failure } %

Or this, which is repeated content:

pNameservers:
dnr_remember name=nameserver
br
nbsp;a href=host.adp?host=%=[dnr_host
host_fqdn $ns]%%=[dnr_host host_fqdn $ns]%/a
/dnr_remember
dnr_remember name=address
br
nbsp;nbsp;%=$address%
/dnr_remember
%
foreach ns [lsort -command dnr_host_compare_by_fqdn $ns_ids] {
dnr_adp_recall nameserver
foreach address [lsort $host_addrs($ns)] {
dnr_adp_recall address
}
}
%


On Mon, 20 Jan 2003, Patrick Spence wrote:

 Except the parser writing would happen once, whereas the HTML coding is an
 ongoing thing... :)

Not sure what your point was here.

 Dreamweaver has some really nice dynamic application
 extensions that make work like this to be fast and easy to work with.

Yes, my approach doesn't have dreamweaver extensions to support it (yet),
but...

 This doesn't really lend itself to prepare the variable and display it
 later...

I think this method lends itself to dynamic work just fine.  Try it before
you DOA it.

Pete.



[AOLSERVER] OTish: Data abstraction facilities in Tcl

2003-01-17 Thread Peter M. Jansson
(...that work in AOLserver.)

So, I've been writing Tcl for AOLserver since it only ran Tcl 7.4, and you
only had 3 choices for storing data in Tcl -- scalars, lists and arrays.
Things like a list of arrays weren't possible; if you wanted to have such
a thing, you had to fake it.  I admit, I've gotten used to being able to
do such things in Perl, where an array of hashes is an ordinary thing (or
at least an array of hash references), and I have to say that I find it
convenient.  How do Tcl programmers normally do such things?  Do they
avoid messes like these, handle them in other languages, and provide Tcl
commands to manipulate them?  Do they use one or more Tcl add-ons?  (If so,
 which ones work under AOLserver?)  Or am I approaching the problem from
the wrong perspective?

What makes this an AOLserver question, rather than just a Tcl question, is
that I want to make sure whatever I do would be supported within AOLserver.
  But other than that, it's not really an AOLserver question.

Thanks,
   Pete.



Re: [AOLSERVER] OTish: Data abstraction facilities in Tcl

2003-01-17 Thread Peter M. Jansson
I swear, I knew this had been discussed before, I just was looking for
pointers.  I found the right set of things to ask Google, and came up with
these

http://www.pinds.com/acs-tips/tcl-data-structures
   Lars doesn't believe Tcl is good for this stuff

http://mini.net/tcl/2995
   The Tcl'ers Wiki on the topic:

http://mini.net/tcl/1481
   lindex in 8.4 can manipulate sublists of a list (Thanks, Jeff!)

I'd still love to read more on this topic.  I forgot to mention that,
although I've been working in Tcl since 7.4, I am lacking in how Tcl has
changed in 8.4.  I'll be Googling for that, but I'd be happy for pointers
on that, too.

Thanks,
   Pete.



Re: [AOLSERVER] OTish: Data abstraction facilities in Tcl

2003-01-17 Thread Peter M. Jansson
I got this...

On Fri, 17 Jan 2003, Dossy wrote:
 Generally, when I find myself needing things like, say, a list of
 arrays, in Tcl, they tend to be design smells.  It's the I can write
 Perl in any language! syndrome.

...and this:

On Fri, 17 Jan 2003, Brett Schwarz wrote:
 I am just curious, can you give an example of something that is giving
 you a hard time?


OK.  When I'm building a substantial app, there's a lot of data floating
around.  When I'm pulling data out of the database, I often will have
something where I have a brand that has customers that have orders that
have line items, and I want to store those.  I think managing complexity
by abstracting the data is good programming practice.  When I've done this
in the 7.x-era Tcl, I've done it by using an array with specially-crafted
indices, and using wrapper functions so I can do things like set orders
[customers orders $customer_id] and get a list of order IDs.  But I find
my array implementations to be kludgy (more a defect of the class of
solutions, rather than the particular implementation), so I'm always
looking for something better.  Also, I want to do a lot of the persistence
work only once, so I want routines that pull records from the database
based on criteria I specify, and carry them in a cache, and then notice
when I modify the records so I can then do a cache commit to do all the
updates.  And I want to write those routines to be generic, so I don't
have to rewrite them again for each database table. (I really did this for
one project, and it mostly worked, but it was fragile.)  Recently, I've
gotten to do some work in WebObjects, which has a lot of this done, but in
Java, and I still find value in the Tcl/AOLserver approach, so I'm looking
to apply some of these ideas in Tcl, but the data structures as I knew
them felt too constraining. I think the 8.4 list implementation is a step
in the right direction; I don't know if it's really what I'm looking for,
but I think it will be cleaner (and probably faster, given the
implementation differences between arrays and lists) than the array
implementation I've done.

Pete.



Re: [AOLSERVER] Browser Id

2003-01-16 Thread Peter M. Jansson
In a Tcl script or .adp page:

   set headers [ns_conn headers]
   set browser_type [ns_set iget $headers user-agent]

On Thursday, January 16, 2003, at 11:11 AM, linqs wrote:


Hi
Is there any possibility to find out which web browser a client
uses?

regards

linqs



Re: [AOLSERVER] New to AOLServer (using with OACS4.6 head + postgres 7.3.1)

2003-01-16 Thread Peter M. Jansson
On Thursday, January 16, 2003, at 04:15 PM, tammy wrote:


[30/Dec/2002:15:08:59][28103.1024][-main-] Warning: modload: failed to
load '/usr/local/aolserver/bin/nspostgres.so': 'libpq.so.2: cannot
open shared object file: No such file or directory'


You may need to explicitly set the LD_LIBRARY_PATH, or copy/symlink libpq.
so.2 into the aolserver directory.

Another possibility -- have you specified that AOLserver should chroot?
If so, is libpq.so.2 somewhere AOLserver will be able to find it once
chrooted?

Pete.



Re: [AOLSERVER] AOLserver 4: Virtual server fix

2003-01-15 Thread Peter M. Jansson
On Wednesday, January 15, 2003, at 05:42 PM, Tim Moss wrote:


localhost 
localhost 

what does the  mean?


It means:

a.) You haven't applied the patch I sent, and
b.) You tried to access the server using a hostname of localhost, but
localhost was not mapped to any server.  You will not get any response
from this (ever) unless you apply my patch.

Pete.



Re: [AOLSERVER] AOLserver 4: Virtual server fix

2003-01-15 Thread Peter M. Jansson
On Wednesday, January 15, 2003, at 06:56 PM, Tim Moss wrote:


OK, all patches applied and rebuilt.

All seems to be working - thank you very much for your help Peter.


Glad to help.


By the way here's my config file: (might be a neat way to avoid having a
huge config file)


I do something similar, and I allow for sourcing an additional, optional
file for each virtual (in my for loop, I test for existence of a file, and
source it if it's there).



Re: [AOLSERVER] AOLserver 4: Virtual server fix

2003-01-13 Thread Peter M. Jansson
Sure.  Except what I sent was broken.  I grabbed the default server from
the wrong place.

/me hangs head in shame.

OK, now it works.

Corrected patch follows:

diff -ur --exclude=CVS aolserver/nsd/nsd.h aolserver-vsfix/nsd/nsd.h
--- aolserver/nsd/nsd.h Tue Oct 29 19:01:51 2002
+++ aolserver-vsfix/nsd/nsd.h   Mon Jan 13 21:33:47 2003
@@ -110,6 +110,8 @@

 typedef int bool;

+struct NsServer;
+
 struct _nsconf {
 char  *argv0;
 char  *nsd;
@@ -131,6 +133,7 @@
  */

 Tcl_HashTable   servertable;
+struct NsServer *defaultserver;
 Tcl_DString servers;

 /*
@@ -261,8 +264,6 @@
  * The following structure maitains data for each instance of
  * a driver initialized with Ns_DriverInit.
  */
-
-struct NsServer;

 typedef struct Driver {

diff -ur --exclude=CVS aolserver/nsd/queue.c aolserver-vsfix/nsd/queue.c
--- aolserver/nsd/queue.c   Tue Oct 29 19:02:06 2002
+++ aolserver-vsfix/nsd/queue.c Mon Jan 13 22:10:17 2003
@@ -244,11 +244,12 @@
servPtr = Tcl_GetHashValue(hPtr);
}
}
-fprintf(stderr, %s %p\n, host, servPtr);
 }
 if (servPtr == NULL) {
-   return 0;
+   servPtr = nsconf.defaultserver;
+Ns_Log(Notice, Serving request for %s with %s, host, servPtr-server);
 }
+Ns_Log(Notice, request for %s, host);

 /*
  * Select connection pool.
diff -ur --exclude=CVS aolserver/nsd/server.c aolserver-vsfix/nsd/server.c
--- aolserver/nsd/server.c  Tue Oct 29 19:02:13 2002
+++ aolserver-vsfix/nsd/server.cMon Jan 13 22:16:52 2003
@@ -204,6 +204,9 @@
 servPtr = ns_calloc(1, sizeof(NsServer));
 Tcl_SetHashValue(hPtr, servPtr);
 initServPtr = servPtr;
+if (nsconf.defaultserver == NULL) {
+   nsconf.defaultserver = servPtr;
+}

 /*
  * Create a new NsServer.



Re: [AOLSERVER] Virtual server fix - third time's the charm?

2003-01-13 Thread Peter M. Jansson
OK, now I took out the Ns_Log statement I used to debug this.

It still works.

diff -ur --exclude=CVS aolserver/nsd/nsd.h aolserver-vsfix/nsd/nsd.h
--- aolserver/nsd/nsd.h Tue Oct 29 19:01:51 2002
+++ aolserver-vsfix/nsd/nsd.h   Mon Jan 13 21:33:47 2003
@@ -110,6 +110,8 @@

 typedef int bool;

+struct NsServer;
+
 struct _nsconf {
 char  *argv0;
 char  *nsd;
@@ -131,6 +133,7 @@
  */

 Tcl_HashTable   servertable;
+struct NsServer *defaultserver;
 Tcl_DString servers;

 /*
@@ -261,8 +264,6 @@
  * The following structure maitains data for each instance of
  * a driver initialized with Ns_DriverInit.
  */
-
-struct NsServer;

 typedef struct Driver {

diff -ur --exclude=CVS aolserver/nsd/queue.c aolserver-vsfix/nsd/queue.c
--- aolserver/nsd/queue.c   Tue Oct 29 19:02:06 2002
+++ aolserver-vsfix/nsd/queue.c Mon Jan 13 22:23:42 2003
@@ -244,10 +244,9 @@
servPtr = Tcl_GetHashValue(hPtr);
}
}
-fprintf(stderr, %s %p\n, host, servPtr);
 }
 if (servPtr == NULL) {
-   return 0;
+   servPtr = nsconf.defaultserver;
 }

 /*
diff -ur --exclude=CVS aolserver/nsd/server.c aolserver-vsfix/nsd/server.c
--- aolserver/nsd/server.c  Tue Oct 29 19:02:13 2002
+++ aolserver-vsfix/nsd/server.cMon Jan 13 22:16:52 2003
@@ -204,6 +204,9 @@
 servPtr = ns_calloc(1, sizeof(NsServer));
 Tcl_SetHashValue(hPtr, servPtr);
 initServPtr = servPtr;
+if (nsconf.defaultserver == NULL) {
+   nsconf.defaultserver = servPtr;
+}

 /*
  * Create a new NsServer.



Re: [AOLSERVER] Virtual server fix - not yet

2003-01-13 Thread Peter M. Jansson
There's some subtle dependency, because on certain responses (410, for
example, with 0 bytes of content), the content-length gets blown away when
using my patch.  I'd hold off for now, and I'll see what's the matter.

Pete.



[AOLSERVER] AOLserver 4: nsd/return.c bug

2003-01-13 Thread Peter M. Jansson
If a head command is issued, then no data (including the headers) is
written to the client.  Also, the length of the headers is subtracted from
the sent bytes count in the conn, causing the sent bytes count to go
negative (except that in nslog/nslog.c, the count is rendered as an
unsigned, so it appears to be a very big number, or else my DSL line just
got _really_ fast).

The enclosed patch does two things:

   - When sending data, if the data is null, send the headers anyway.
   - Count the headers in the sent bytes count.

I'm not sure why the headers were excluded from the count, so someone
should check this.

This was why I thought my virtual server patch was broken, but it doesn't
have anything to do with that.

Patch follows:

diff -ur aolserver/nsd/return.c aolserver-vsfix/nsd/return.c
--- aolserver/nsd/return.c  Sat Sep 28 15:24:31 2002
+++ aolserver-vsfix/nsd/return.cMon Jan 13 23:39:43 2003
@@ -260,7 +260,6 @@
connPtr-responseStatus = status;
if (!(conn-flags  NS_CONN_SKIPHDRS)) {
Ns_ConnConstructHeaders(conn, connPtr-queued);
-   connPtr-nContentSent -= connPtr-queued.length;
}
conn-flags |= NS_CONN_SENTHDRS;
 }
@@ -706,6 +705,8 @@
 result = NS_OK;
 if (data != NULL  !(conn-flags  NS_CONN_SKIPBODY)) {
result = Ns_WriteConn(conn, data, len);
+} else {
+   result = Ns_WriteConn(conn, NULL, 0);
 }
 if (result == NS_OK) {
result = Ns_ConnClose(conn);



[AOLSERVER] AOLserver 4: Virtual server fix (again)

2003-01-13 Thread Peter M. Jansson
Hey Rocky, watch me pull a rabbit out of my hat!

Again?

Yep, I've got this patch again.  I think it's OK now; the bad behavior I
noticed earlier seems to have come from another bug.  Also, I moved the
defaultserver element in the nsconf struct to the bottom, to make sure it
wasn't goofing up memory somewhere. So here goes:

diff -ur --exclude=CVS aolserver/nsd/nsd.h aolserver-vsfix/nsd/nsd.h
--- aolserver/nsd/nsd.h Tue Oct 29 19:01:51 2002
+++ aolserver-vsfix/nsd/nsd.h   Mon Jan 13 22:44:59 2003
@@ -110,6 +110,8 @@

 typedef int bool;

+struct NsServer;
+
 struct _nsconf {
 char  *argv0;
 char  *nsd;
@@ -177,6 +179,8 @@
char *version;
 } tcl;

+struct NsServer *defaultserver;
+
 };

 extern struct _nsconf nsconf;
@@ -261,8 +265,6 @@
  * The following structure maitains data for each instance of
  * a driver initialized with Ns_DriverInit.
  */
-
-struct NsServer;

 typedef struct Driver {

diff -ur --exclude=CVS aolserver/nsd/queue.c aolserver-vsfix/nsd/queue.c
--- aolserver/nsd/queue.c   Tue Oct 29 19:02:06 2002
+++ aolserver-vsfix/nsd/queue.c Mon Jan 13 23:12:03 2003
@@ -244,10 +244,9 @@
servPtr = Tcl_GetHashValue(hPtr);
}
}
-fprintf(stderr, %s %p\n, host, servPtr);
 }
 if (servPtr == NULL) {
-   return 0;
+   servPtr = nsconf.defaultserver;
 }

 /*
diff -ur --exclude=CVS aolserver/nsd/server.c aolserver-vsfix/nsd/server.c
--- aolserver/nsd/server.c  Tue Oct 29 19:02:13 2002
+++ aolserver-vsfix/nsd/server.cMon Jan 13 22:44:59 2003
@@ -204,6 +204,9 @@
 servPtr = ns_calloc(1, sizeof(NsServer));
 Tcl_SetHashValue(hPtr, servPtr);
 initServPtr = servPtr;
+if (nsconf.defaultserver == NULL) {
+   nsconf.defaultserver = servPtr;
+}

 /*
  * Create a new NsServer.



Re: [AOLSERVER] gzip compression

2003-01-05 Thread Peter M. Jansson
On Sun, 5 Jan 2003, Jim Davidson wrote:

 I'm not sure this could be done well in a single, global manner.  Instead,
 hooks for the three most common request paths directly in the aolserver core
 may be needed:
[snip]
 perhaps this stuff should be a compile time option triggered on with a
 --with-gzip= style autoconf thing (ugly as that may be).

I wouldn't mind seeing hooks, especially if they can be made more generic;
gzip is today's problem, but I'm sure there will be another down the road.
It would be nice to be able to have a stack of stream postprocessors, of
which gzip compression could be one.  Another module to get pushed onto
the stack might be rate-limiting (so that a greedy client gets no more
than x bytes per second; different from connection throttling, which needs
to be done at the front of the request).



Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Peter M. Jansson
By now, you seem to have links to most of the major virtual domain
implementations for AOLserver; what you might not have is some data for
figuring out which to use.  I can fill in a little...

Since AOLserver 3.x, virtual domains are no longer supported in AOLserver
(although they are coming back for 4.x).  AOlserver 3.x runs a server with
a single name on one or more IP addresses, but it has a single responder
for all listeners.  Generally, there are two approaches to achieving
virtual domains with AOLserver 3.x:

- Run multiple instances of AOLserver on a private IP address and private
ports, and use a front-end webserver (which could be AOLserver or could be
some other webserver) to reverse-proxy the incoming traffic to the
appropriate AOLserver instance

- Install code that intercepts the request, divine the intended virtual
server from the intended IP address and any Host headers in the request,
and handle the request locally, using different code depending on the
virtual server.

One variant of the first strategy is to use one AOLserver running nsvhr,
and multiple instances running nsunix; this runs the virtual instances
over a Unix domain socket, instead of a TCP/IP socket, which helps to
conserve ports, and does not expose the virtual instances to the network,
but has been historically buggy, unable to run out-of-the-box without
patches.  Apparently in the latest version, nsvhr and nsunix work
out-of-the-box, although confirmation of this is sketchy.  If you want to
use the reverse-proxy approach, you're probably best using TCP connections
(it's not clear there are performance advantages from using Unix domain
sockets, as far as I know).

There are several modules that implement the second approach, and each
works slightly differently, but all seem to work well.

Unless you use separate instances for the,, Virtual servers on AOLserver 3.
x really just let you separate the static content; you don't get separate
Tcl interpreters, and you don't get the suexec for CGI (although you can
use CGIWrap).   You can still get a lot of mileage out of it, though.

Hope this helps.

   Pete.

On Friday, January 3, 2003, Mike wrote:


Ok I got aolserver working so what do I need to do to setup two websites
to point to one IP I could easily do it with apache but this server is
whole new ball game. ;)




Re: [AOLSERVER] Multiple Domains with one IP

2003-01-03 Thread Peter M. Jansson
On Friday, January 3, 2003, at 01:01 PM, Dossy wrote:


Doing reverse-proxy with nssock, you only see the IP address of your
reverse-proxy in your nslog ... with nsunix, you see the IP address of
the actual requesting client.  This is important to some people, me
included.


Funny,  I was just going to post a note asking how people got around the
issue of access logs when using multiple proxies.  Now I know, and I agree
that getting actual peer addresses makes nsvhr/nsunix much more valuable.



Re: [AOLSERVER] Mutiple Domains with one IP

2003-01-03 Thread Peter M. Jansson
On Friday, January 3, 2003, at 04:04 PM, Shawn Nussbaum wrote:


Can nslog be configured to print out the HOST or URL
values from ns_conn?



Yes.  Add this line:
   ns_paramextendedheaders Host

to your ns/server/${servername}/module/nslog section.



Re: [AOLSERVER] Informix Drivers

2002-12-16 Thread Peter M. Jansson
Are you sure that the user mentioned in the -u user argument to nsd has
execute permission on $aolhome/bin/iusid.so?

On Monday, December 16, 2002, at 06:01 PM, Durga wrote:


I have a one more problem. Here it is:

I am trying utilize the Port 80, so when I try to start the websever as
root( $aolhome/bin/nsd -it $aolhome/nsd.tcl -u user -g group ), I have
trouble loading some of the modules, especially Informix Driver!..I didn'
t
have problem when it wasn't the ROOT..

Here is the error message:

[16/Dec/2002:13:13:22][29239.1][-main-] Notice: modload: loading
'/users/WWW/AOL/aolserver_3.5/bin/iusid.so'
[16/Dec/2002:13:13:22][29239.1][-main-] Warning: modload: failed to load
'/users/WWW/AOL/aolserver_3.5/bin/iusid.so': 'l
d.so.1: ./bin/nsd: fatal: libtsql.so: open failed: No such file or
directory'
[16/Dec/2002:13:13:22][29239.1][-main-] Error: dbdrv: failed to load
driver
'informix_driver'
[16/Dec/2002:13:13:22][29239.1][-main-] Error: dbinit: no such default
pool
'informix_pool'

Any ideas?



[AOLSERVER] ns_puts or ns_adp_puts?

2002-12-04 Thread Peter M. Jansson
Both of these commands exist, and will run the same code.  I seem to
recall that ns_puts is deprecated in favor of ns_adp_puts, for better
naming consistency, but the code doesn't say, and the CVS log doesn't give
a clue, either.  Which is preferred?  Or are both equally preferred?  (or
equally deprecated?)



[AOLSERVER] ns_adp_registertag or ns_adp_registercmd?

2002-12-04 Thread Peter M. Jansson
Another one.

Both of these commands are registered, and run the same code, and the code
does not appear to differentiate between the two.  The current HTML docs
define ns_adp_registertag, but do not define ns_adp_registertag.  Should
both be defined, with ns_adp_registercmd marked as deprecated?

(I think it's a good idea to document all of the commands, even if they
are deprecated, as long as they're in the code base.  Deprecated commands
and functions should be clearly marked as such. )



Re: [AOLSERVER] ns_adp_registertag or ns_adp_registercmd?

2002-12-04 Thread Peter M. Jansson
ns_register_adptag and ns_adp_registeradp are different; the former causes
an ADP string to be invoked upon encountering the tag, and the latter
causes a Tcl proc to be invoked.  My guess is that ns_adp_registertag is
too confusing, because it's name is close to the former, but it's a
synonym for the latter.  I think this should probably be fixed in code
someday, but for now the focus is on the docs, and I'm thinking that
ns_adp_registertag should be deprecated in favor of ns_adp_registeradp,
while continuing to endorse ns_register_adptag.

On Wednesday, December 4, 2002, at 05:40 PM, Scott S. Goodwin wrote:


There are actually three commands, all point to NsTclRegisterAdpCmd and
have
an identical effect:

ns_register_adptag, NsTclRegisterTagCmd, NULL
ns_adp_registeradp, NsTclRegisterAdpCmd, NULL
ns_adp_registertag, NsTclRegisterAdpCmd, NULL

ns_register_adptag

  and

ns_adp_registeradp

ought to be considered deprecated.

/s.


- Original Message -
From: Peter M. Jansson [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, December 04, 2002 4:29 PM
Subject: [AOLSERVER] ns_adp_registertag or ns_adp_registercmd?



Another one.

Both of these commands are registered, and run the same code, and the
code
does not appear to differentiate between the two.  The current HTML docs
define ns_adp_registertag, but do not define ns_adp_registertag.  Should
both be defined, with ns_adp_registercmd marked as deprecated?

(I think it's a good idea to document all of the commands, even if they
are deprecated, as long as they're in the code base.  Deprecated commands
and functions should be clearly marked as such. )





Re: [AOLSERVER] Informix Drivers

2002-11-21 Thread Peter M. Jansson
On Wednesday, November 20, 2002, at 07:26 PM, Durga wrote:


[20/Nov/2002:17:16:25][1753.25][-conn1-] Error: exec: process 6534 exited
from signal: 11
[20/Nov/2002:17:16:25][1753.25][-conn1-] Error: exec: process 6534 dumped
core



Is the Informix driver an external driver?  If so, it looks like the
driver is segfaulting right away, so AOLserver can't get a handle open.
Could this be a gmake issue again?  Otherwise, what do you get in a stack
backtrace from the core file?  (It says it dumped core.)



Re: [AOLSERVER] Informix Drivers

2002-11-21 Thread Peter M. Jansson
Durga,

What do you get from running pstack on the core file?



Re: [AOLSERVER] Informix Drivers

2002-11-21 Thread Peter M. Jansson
pstack /path/to/core

On Thursday, November 21, 2002, at 01:03 PM, Durga wrote:


Pete,

How do I issue a command on core file?..Looks like pstack command is for
process id. I don't get the process id, it immediately aborts with core.
Can
you please let me know how can I get this? Is any other command?

-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Peter M. Jansson
Sent: Thursday, November 21, 2002 10:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] Informix Drivers


Durga,

What do you get from running pstack on the core file?



Re: [AOLSERVER] Informix Drivers

2002-11-21 Thread Peter M. Jansson
On Thursday, November 21, 2002, at 01:46 PM, Durga wrote:


I also did strings core, here is what I get:


Sorry, but that doesn't help.



Re: [AOLSERVER] Informix Drivers

2002-11-21 Thread Peter M. Jansson
On a Solaris 8 machine, I did ulimit -c unlimited and started a program
and then killed it with -ABRT, producing a core file. I then ran pstack
core (no -F), and got this:

core 'core' of 17914:   perl
 ff11ab94 _read(ff13c2cc, ff13fa34, 50, 1, 4040004, 22c30) + c
 ff307064 Perl_sv_gets (22c30, 0, 29f68, 0, 0, a) + 618
 ff30f57c Perl_yylex (ff347620, ff33f788, ff347208, ff338fc4, ff13c2cc, 0)
 + e9c
 ff2bc750 Perl_yyparse (ff34778c, 45fa, ff338fc4, ff34226a, ff344a0c, 10c5)
 + 150
 ff2bfdb8 perl_parse (ff347484, , 22018, ff347218, 0, 1) + c28
 00011044 main (1, 22000, ffbefb0c, 21c00, 0, 0) + 68
 00010fc4 _start   (0, 0, 0, 0, 0, 0) + b8

Make sure you've built the Informix driver with debugging enabled, so you
get all the symbols, and then work with your ulimit to make sure you're
generating a well-formed core file.  The first line of the pstack output,
the Core 'core' of 17914: perl says that you're dumping the stack on a
core file named core from a process that had pid 17914, and was named
perl.  The rest of the lines are the call stack in reverse order.

Pete.

On Thursday, November 21, 2002, at 01:35 PM, Durga wrote:


I did the same command, but pstack doesn't work on box. So I copied the
core file to other machine then I did pstack command. Here is what I
got:

pstack -F core
core 'core' of 20890:   /users/WWW/AOL/aolserver_3.5/bin/iuspd
 0008  (0, 0, 0, 0, 0, 0)

Does it make sense?

Thanks,
Durga

-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Peter M. Jansson
Sent: Thursday, November 21, 2002 11:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] Informix Drivers


pstack /path/to/core

On Thursday, November 21, 2002, at 01:03 PM, Durga wrote:


Pete,

How do I issue a command on core file?..Looks like pstack command is
for
process id. I don't get the process id, it immediately aborts with core.
Can
you please let me know how can I get this? Is any other command?

-Original Message-
From: AOLserver Discussion [mailto:[EMAIL PROTECTED]]On Behalf
Of Peter M. Jansson
Sent: Thursday, November 21, 2002 10:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [AOLSERVER] Informix Drivers


Durga,

What do you get from running pstack on the core file?



Re: [AOLSERVER] using aolserver for mail

2002-11-19 Thread Peter M. Jansson
On Monday, November 18, 2002, at 10:52 PM, [EMAIL PROTECTED] wrote:


We sometimes have to send millions of emails every week (not spam), and
sendmail simply cannot handle the volume that a out of the box qmail
configuration can. Nothing is as beautiful as seeing qmail
simultaneously send 256 emails.


Unless all 256 emails are going to the same box, and you are the horrified
sysadmin of that box watching qmail crush you with incoming traffic.

The out-of-the-box config of qmail is definitely faster than the
out-of-the-box config of sendmail, but if you add queues to sendmail, it
can push as many simultaneous messages as you want, and it can push them
faster than qmail can.



Re: [AOLSERVER] using aolserver for mail

2002-11-18 Thread Peter M. Jansson
On Monday, November 18, 2002, at 05:16 PM, Gabriel Ricard wrote:


So, has this been done already? Or even thought of? Is it possible?


Primehost used to have a module that would speak rudimentary SMTP, but it
would mostly forward messages on to a delivery hub.   I doubt the code
would work in 3.x, even if someone could find it.


Or am I just nuts?


Kinda.

SMTP is a simple protocol (a simple mail transport protocol, to be
specific), but there are some complex semantics behind SMTP, such as
knowing that you must have guaranteed that the message is received and
safe (which usually means committed to disk) before you return the
Message queued status to the DATA command.  There are a bunch of other
gotchas like that one, and it becomes really easy to screw up routing
semantics given the wide array of legal addressing formats.  Basically,
while it's easy to emit and read SMTP format, getting the protocol right
is actually pretty hard, unless most of what you do is pass messages along
to a smarter mail server.

I'm not trying to say no one else should ever write an SMTP server, I'm
just saying the job is a lot harder than it looks, and if you can use an
existing one, you'll save yourself a lot of heartache.  You should prowl
USENET groups or mailing lists to see if there is information about tuning
Exim; most mail servers are way faster than the connections they serve
(your case may be different), and you may be suffering from another
problem, like slow DNS resolution (running a caching-only DNS server on
the same box as the mail server may help), or file system problems (if you
queue a lot of messages, too many files in one directory can slow down
some file systems; try another filesystem).  If you can't tune Exim
adequately, consider another Mail Transport Agent (MTA); I'd recommend
sendmail (I know, you're going to say it's slow and insecure; I'll say
Stop running a sendmail from the early '90s).  Properly configured, the
current sendmail implementation can process more messages per second than
current releases of postfix or qmail.  Among the reasons are that sendmail
can relay messages without doing any disk writes in many cases.   Proper
configuration usually means watching your timeouts. creating multiple
queues, and moving slow messages to slow queues (most folks don't run
sendmail with more than 1 queue). You can use aliases supported by most
MTAs to run code through Tcl procs (and once AOLserver 4 comes out, you
can load libnsd.so and get all your favorite AOLserver functions), and
sendmail and postfix will both allow you to read virtual user mappings
from a database (including MySQL and PostgreSQL, if you plug in the right
drivers) or LDAP.  Ok, it's not as friendly to configure as AOLserver, but
sendmail and postfix do their jobs really well (Exim probably does, too).

Another point is that if your problem is DNS or filesystem issues,
switching to another MTA won't fix it, so that's another point in favor of
trying to understand why your current setup is slower than you want it to
be.

So, before you start reading and rereading RFC 821 and friends, see if you
can adjust your MTA environment first, to make it perform to your needs.

Pete.



Re: [AOLSERVER] using aolserver for mail

2002-11-18 Thread Peter M. Jansson
On Monday, November 18, 2002, at 06:04 PM, Steve Manning wrote:


Have you read the 'bat' book for SendMail? - it'll give you an idea of
the complexities of address rewriting.


In all fairness, sendmail's address rewriting capabilities date to a time
before TCP/IP was the lingua franca, and address rewriting was a real hell;
 sendmail's job was to understand every possible address format, and many
of them are obsolete today, so you can get by with a smaller set; it's
still daunting, but you don't have to support everything sendmail does
(especially what's in the bat book, which is pretty old).



Re: [AOLSERVER] using aolserver for mail

2002-11-18 Thread Peter M. Jansson
On Monday, November 18, 2002, at 06:11 PM, Gabriel Ricard wrote:


 (I don't really want to touch sendmail at all - too wary of security
issues).


Cut that out!  Sendmail has no active security issues, and hasn't had a
live exploit in at least five years.  There are reasons you may want to
avoid sendmail, but security should not be one of them.



Re: [AOLSERVER] Parrot for multi-lang support?

2002-11-13 Thread Peter M. Jansson
On Wednesday, November 13, 2002, at 09:36 AM, Dossy wrote:


I'm glad the open source community's getting to reinvent the Sun/Java
wheel, but ...


Which is a reinvention of the Smalltalk wheel.



Re: [AOLSERVER] Parrot for multi-lang support?

2002-11-13 Thread Peter M. Jansson
On Wednesday, November 13, 2002, at 01:08 PM, Titus Brown wrote:


Now that would be nice... ;)  Smalltalk and Objective C both seem to be
interesting languages that are much neglected these days.


The Squeak project (http://www.squeak.org/) seems fairly active,  and ObjC
got new focus because it's used as the core development language for one
of Apple's Mac OS X APIs.



Re: [AOLSERVER] problems

2002-11-13 Thread Peter M. Jansson
On Wednesday, November 13, 2002, at 02:20 PM, Seth Fitzsimmons wrote:


Is there a list of Tcl commands that aren't threadsafe and thus
shouldn't be used in AS?


I don't think this is an issue of thread safety, so much as bugs in the
implementation or use of commands that can cause problems.  The cd
command appears to share behavior with the clock format ... -gmt 1
 bug that Zoran reported recently (fixed now or soon, right?) in that both
commands affect a process-wide resource without locking it, which can lead
to memory corruption, so I think the right guideline is that Tcl commands
which affect process-wide resources should be sure to lock some resource
to ensure single-threaded access to the command.



Re: [AOLSERVER] Emacs indents for tcl and C

2002-11-12 Thread Peter M. Jansson
I thought this issue was addressed in the AOLserver Engineering Standards
Manual:

   http://www.aolserver.com/docs/devel/tech/standards.html#low

I don't think we'll benefit from rehashing this issue, especially since a
large number of other open-source projects are sticking with spaces.  I'd
like to suggest we leave standard as it stands, as specified in the
AOLserver Engineering Standards Manual; I'm sure Dossy will join the
prevailing standard, even though it's different from his opinion.

This document:

   http://www.jwz.org/doc/tabs-vs-spaces.html

Includes information on how to set up emacs and vim (vi and nvi users like
me are out-of-luck) to use spaces.

I really think this issue can turn in to a big distraction when we have so
much else to do.

Pete.

On Tuesday, November 12, 2002, at 09:58 AM, Scott S. Goodwin wrote:


I will put together a guide based on this information and make it part of
the Developer's Guide. At that point we can decide as a community if and
how we want to apply this standard, or decide not to do anything at all
about it.



Re: [AOLSERVER] Emacs indents for tcl and C

2002-11-12 Thread Peter M. Jansson
On Tuesday, November 12, 2002, at 10:24 AM, Simon Millward wrote:


Mind you what really surprises me is that I've *never* met anyone who
prefers tabs before...?


For the record, I generally prefer tabs in my own work.  Twenty years ago
I worked with plenty of people who preferred tabs.  Today, I think there's
a change in the prevailing sentiment, but I'm sure you won't have to turn
over too many rocks to find other tab-lovers.

(For work shared with others, I'm ambivalent, but tending to prefer spaces
these days.)



Re: [AOLSERVER] HTTP 1.1 Pipelining.

2002-11-11 Thread Peter M. Jansson
On Monday, November 11, 2002, at 03:35 AM, Andrew Piskorski wrote:


 pipelineing ... keepalive ...
What's the difference between the two?


I thought pipelining was the ability to send in more than one request
without waiting for the first to finish; responses are returned in order
of request.  Keepalive is required for pipelining, but you can have
keepalive while making requests serially, without pipelining.



Re: [AOLSERVER] Emacs indents for tcl and C

2002-11-11 Thread Peter M. Jansson
On Sunday, November 10, 2002, at 11:43 PM, Jerry Asher wrote:


Why tabs?


If you are an emacs user, then the tab key means indent this line to the
proper level, and you don't care whether it uses tabs or spaces (but
spaces work out better on many printers).

If you use an editor for which the tab key means tab, rather than
indent, then tabs are easier than spaces because you only require a
single keystroke to increase or descrease indentation, whereas with spaces,
 you require as many keystrokes as you use spaces per indent.

I'll suggest, though, that there is little good to be had in this
discussion, because the folks who like tabs hate editors with an indent
key, but won't argue the merits of that function rather than the keystroke
count; likewise, the folks who like editors with an indent key think the
whole tabs/spaces thing is silly.  Because each side is arguing about
something different, and unrelated to the position held by the other side,
 the argument never gets anywhere.



Re: [AOLSERVER] AOLserver Project Update

2002-11-11 Thread Peter M. Jansson
On Monday, November 11, 2002, at 01:22 PM, Jeff Hobbs wrote:


a list is really just a scalar with whitespace between
the elements


Woah, that last part isn't true at all, and is a common misconception
that leads people to think Tcl isn't up-to-snuff, which isn't true.


[snip]


That means that list's lindex accessor is O(1) and appends are O(1)
except where we need to increase the C Tcl_Obj **objv array (and that
only needs to copy the pointers).


I'm happy to stand corrected regarding the implementation, but for someone
writing Tcl code, is there a meaningful difference between my flawed
conceptual model and the implementation?



Re: [AOLSERVER] AOLserver Project Update

2002-11-08 Thread Peter M. Jansson
On Thursday, November 7, 2002, at 09:27 PM, Gabriel Ricard wrote:


   - Note: my only gripe with ADP is that the following does not
appear
to work:

   if { [check $something] == 1 } {
   %
   bbreak out of Tcl mode and process some HTML
conditionally/b
   %
   }



What I usually do here is to register a tag that saves a fragment of the
page in a slot in an array, so I do stuff that looks like this:

   blah blah blah
   adp_remember name=conditional1
   bspecial blah/b
   /adp_remember
   %
   if [check $something] {
   adp_recall conditional1
   }
   %

This has the benefit of being friendly to most of the WYSIWYG HTML editors
(life is too short to edit HTML with vi, emacs or Notepad), and the code
to implement the registered tag is simple, and even requires no locking.
At the moment, because of limitations in the ADP parser, I can't nest
remembered tags, so sometimes I've got some fairly convoluted logic, but
I've been able to do a lot with this.



Re: [AOLSERVER] AOLserver Project Update

2002-11-08 Thread Peter M. Jansson
On Friday, November 8, 2002, at 09:35 AM, Dossy wrote:


This is how I implement this:

%
if {[check $something] == 1} {
ns_adp_puts {
bbreak out of Tcl mode and process some HTML
conditionally/b
}
}
%


The only reason I do the other thing is that the method you're using is
really hostile to Dreamweaver, Mozilla Composer, or GoLive.  I can edit my
HTML in my WYSIWYG editor, and some of the editors include facilities for
doing thing sitewide that are just as good as ns_adp_include, but don't
require a runtime execution (Why Grandma, what a static page you have.
The better to cache you with, my dear).

My personal preference is not to force HTML to be edited in a text editor,
 where possible.



Re: [AOLSERVER] URL case insensitivity.

2002-11-08 Thread Peter M. Jansson
On Friday, November 8, 2002, at 12:51 PM, Lamar Owen wrote:


Does anyone know of a solution better than storing
the files on a FAT filesystem with Linux doing the case reversion in the
filesystem layer?


If you run it on Mac OS X off of an HFS+ partition, you'll get the
case-insensitive, case-preserving features.



Re: [AOLSERVER] URL case insensitivity.

2002-11-08 Thread Peter M. Jansson
On Friday, November 8, 2002, at 01:43 PM, Jim Wilcoxson wrote:


Here is a TCL hack to serve files w/o case sensitivity (not tested):


That works when the problem is people entering http://someserver/FOO;
rather than http://someserver/foo;, but it won't help the case where
someone entered the latter, but the content folks uploaded FOO.HTM
(Guess the OS!) instead of foo.htm.



Re: [AOLSERVER] URL case insensitivity.

2002-11-08 Thread Peter M. Jansson
On Friday, November 8, 2002, at 02:05 PM, Jim Wilcoxson wrote:


But in the problem definition, all files were stored in lowercase on disk.
 :)


Sorry about that.  I had my brain filters on when reading.



[AOLSERVER] ACT voting procedural question

2002-11-08 Thread Peter M. Jansson
Since AOL already has representatives on the core team, should AOL
employees be prohibited from voting for community core team members?



Re: [AOLSERVER] How I'll vote for core team members (long)

2002-11-08 Thread Peter M. Jansson
You must have skipped over the Voltron paragraph.

On Friday, November 8, 2002, at 04:27 PM, Scott S. Goodwin wrote:


I don't consider myself a
black-belt in the martial art of coding, which means I probably don't
qualify based on the criteria you've given, so I guess I lost your vote.



Re: [AOLSERVER] How I'll vote for core team members (long)

2002-11-08 Thread Peter M. Jansson
On Friday, November 8, 2002, at 04:27 PM, Scott S. Goodwin wrote:


Should the AOL dev team members have a vote? Absolutely. They are
involved with AOLserver as individuals, they run the largest sites that
use AOLserver.


I've been lucky enough to get some contracting gigs with AOL over the
years, and have known many of the folks, who are among the nicest and
smartest I've met.  My question about voting was not intended to reflect
any feelings toward AOL whatsoever.  I was concerned it might have been
taken that way, but when I tried to write a little about it, I thought it
was too confusing, so I just let the question stand.

Here's the thing:  what is the purpose of the open-source community
segment of the core team?  The AOL part is clear -- they make sure that
AOLserver continues to serve AOL's needs.  There could be a lot of reasons
for the core team, so I just stuck a stake in the ground around the one:
the community members of the core team _represent_ the open source
community.

Maybe I'm wrong.

But if I'm right, then there's a question of fairness, and since AOL
employees already have representation, and since the open source community
has _no_ choice over the composition of the AOL team, is it really fair
for AOL employees to try to influence the representation of the other
folks?  What if they nominate a bunch of other AOL employees, and vote
them in, leaving the open source community with no real representation.

Well, for that matter, there are a bunch of other parliamentary questions,
 like how do we guarantee that everybody who votes gets a single vote, and
how to we guarantee that the ballot box doesn't get stuffed with votes
from folks who have no interest in AOLserver, and...

I think the community is small enough that we can all trust each other on
this first vote (in the future, some procedures should be put in place,
but that's a job for core team 1.0), so I didn't really think it was worth
bringing up the parliamentary issues.

Except for the fairness one, because that's a bit different, in my view.
That's not a question of cheating, so much as a question of fairness, and
getting to the will of the people (to which, as an American, I have a
little sensitivity).  I just had the passing thought that votes for open
source community members, given by AOL employees, were diluting the
representation somehow.

Assuming the job of the community members of the core team is
representation -- and I'm not sure I'm right about that.

It was just a simple question, although I think the answer is far from
straightforward, but I don't think either of the answers is really wrong.
I do think the answers help clarify the role of the core team.

But I didn't really mean to bend anyone out of shape over this.  It was
just a question, and I didn't know if it had occurred to anyone else.



Re: [AOLSERVER] How I'll vote for core team members (long)

2002-11-08 Thread Peter M. Jansson
My point was that my criteria -- and they are just mine, I don't think
anyone should feel obliged to use them -- were less a set of checkboxes
than a set of weighted scores, and that the scores for the individual can
balance with the scores for team as a whole.  If one person is weaker at
coding, but stronger at community relations, it may come out as a wash, as
long as there's someone else with more coding strength involved.

And I really appreciate your sharing some of your criteria.  It helps me
think about mine more.  I hope others will share, too -- that's really why
I sent that note.

On Friday, November 8, 2002, at 04:47 PM, Scott S. Goodwin wrote:


I read it, but sadly I had to lookup Voltron on the net. I lived
overseas at the time,



Re: [AOLSERVER] malloc replacement libraries?

2002-11-07 Thread Peter M. Jansson
Or in an external database driver.  You can set up a driver where the SQL
 it accepts is whatever you need, and then it returns results in a single
column of a single row.  This works especially well if you want to set up
a pool of them

On Thursday, November 7, 2002, at 04:49 AM, Zoran Vasiljevic wrote:


isolating the
bogus code in the Tcl proxy shell (as Nathan suggested)



Re: [AOLSERVER] malloc replacement libraries?

2002-11-07 Thread Peter M. Jansson
On Wednesday, November 6, 2002, at 11:03 PM, Nathan Folkman wrote:


What are the major differences that would need to be bridged between the
stock 3.5.1 code base and 3.3+ad13


The ACS version of AOLserver has i18n support and changes in the DB
interface to support bind variables for the Oracle driver.  The bind
variable support is roughly equivalent to the stored procedure parameter
support of the Sybase driver, but, of course, implemented differently.
Beyond that, there are a few bug fixes, I think, but I haven't seen a list.
  It's the i18n and bind variables support that prevent ACS users from
using a stock AOLserver.

I think the OpenACS project has refactored a bunch of these changes, and
now has their own distribution of AOLserver, so someone from there (Simon?
  Rob?) may be able to step in and enumerate the changes or provide a
reference list.



Re: [AOLSERVER] AOLserver Project Update

2002-11-07 Thread Peter M. Jansson
On Thursday, November 7, 2002, at 09:27 PM, Gabriel Ricard wrote:


I guess I'm just spoiled by the associative arrays in PHP.


Tcl arrays are associative.  Tcl has pretty much 3 data structures:

   - scalars
   - lists
   - arrays (which are associative)

The trick is that a list is really just a scalar with whitespace between
the elements, unless the element is enclosed by braces, so there's really
only two.

Here's an example of Tcl array usage, outside of the DB context:

   set likes(Bob.color) red
   set likes(Earl.color) blue

Now you can do things like:

   puts $likes(Bob.color)

You can also do this:

   set person Bob
   puts $likes($person.color)

And that's how a lot of the DB stuff I do gets done.  I have this routine
I use that sucks in a DB query into an associative array and gives you
back a list of the primary keys in the array (assuming the primary key is
not a composite key), and then you can do this:

   foreach rowkey $rows {
   ns_puts Person: $rowkey; Favorite color:
$fetchResult(key.$rowkey.column.color)
   }

The only problem with it is that it's pretty painfully slow for large
datasets, but the logic is simple enough that you can probably figure out
how it works just from this description.



Re: [AOLSERVER] malloc replacement libraries?

2002-11-06 Thread Peter M. Jansson
I recently tried the Solaris malloc debugging facility, but the AOLserver
(running ACS) went from taking about 5 minutes to start up to taking over
72 hours to start up.  AOLserver uses so much dynamic memory that any
malloc debugging solutions that work by adding virtual-memory hardware
guard buffers around the malloc'd area are going to be r e a l  l  ys
l ow.

I think electric fence is not thread-safe, which is a problem that a lot
of the malloc debugging libraries have.

Sorry I can't be more constructive.  I just had a problem like this, and
didn't solve it, so the system just crashes regularly.



Re: [AOLSERVER] malloc replacement libraries?

2002-11-06 Thread Peter M. Jansson
On Wednesday, November 6, 2002, at 06:00 PM, Dossy wrote:


Sorry I can't be more constructive.  I just had a problem like this, and
didn't solve it, so the system just crashes regularly.


Ouch.  That's a real drag.  Want to describe the problem in case there
might be some ideas from the community?


Unfortunately, I don't have much more to report than Andy did.  I had an
AOLserver 3.3+ad13 running ACS, and it was periodically crashing.  At
first, no coredumps, then I figured out how to use coreadm on Solaris, so
we got the coredumps, and they all showed death inside malloc.  Different
times of day, different server loads, different uptimes.  After I failed
to achieve a diagnosis after a while, the customer decided not to pursue
the matter further.  The customer is bailing on AOLserver anyway, with low
availability of support being a contributing factor; this experience didn'
t really help AOLserver's case any.

It doesn't seem to be a clock format... either.



Re: [AOLSERVER] malloc replacement libraries?

2002-11-06 Thread Peter M. Jansson
Yes, Purify definitely seems to be the way to go.

On Wednesday, November 6, 2002, at 06:12 PM, Andrew Piskorski wrote:


But then I got Purify, which AFAIK
covers everything that Electric Fence can do



Re: [AOLSERVER] malloc replacement libraries?

2002-11-06 Thread Peter M. Jansson
On Wednesday, November 6, 2002, at 10:56 PM, Janine Sisk wrote:


 I haven't a clue what's going on in there, but it can't be good!


You could try to attach gdb to the running process, and then poke around
(start with a stack backtrace); many Unix variants allow this.  You could
also just kill -ABRT the process, which should generate a core dump
(assuming you have core dumps enabled -- check your ulimit -c and, if you'
re running Solaris, your coreadm), then start gdb and get a stack
backtrace.



Re: [AOLSERVER] alloc: invalid block errors

2002-11-05 Thread Peter M. Jansson
On Tuesday, November 5, 2002, at 03:21 PM, Scott S. Goodwin wrote:


Don't let this stop you from writing manual or automated tests -- it
should be fairly straightforward to migrate that code into the framework.


Or from using other quality management tools than testing -- those get
forgotten a lot, and you can't test in quality.



Re: [AOLSERVER] Sign Up for AOLserver Documentation!

2002-11-03 Thread Peter M. Jansson
On Sunday, November 3, 2002, at 02:09 PM, Scott Goodwin wrote:


 It breaks the unix standard of one command per man page


I think Tcl commands are more akin to library calls than shell commands,
and there is no standard for a single library call per man page.  For
examples, look at the documentation for strcpy and friends, or malloc and
friends, which have coalesced a number of closely-related calls into a
single page in every version of Unix I've used since WiCAT Unix (a System
III derivative) in 1983.



Re: [AOLSERVER] Sign Up for AOLserver Documentation!

2002-11-03 Thread Peter M. Jansson
On Sunday, November 3, 2002, at 02:33 PM, Scott Goodwin wrote:


Documenting multiple commands on the same page ... will confuse the
readers


I disagree; I find, for example, that the traditional AOLserver
documentation including all variants of ns_return on a single page helps
me to better understand the range of responses available.



Re: [AOLSERVER] ns_sendmail

2002-11-01 Thread Peter M. Jansson
But I'd avoid using ns_sendmail for a production system, unless you build
around it the mechanisms to handle retries on failures.  If you're calling
ns_sendmail from a .adp, and the sendmail server, for some reason, isn't
up, you'll just get an error, and lose what would have been in the message.
  I think you're probably better off invoking a sendmail process and
writing the email contents to it.

If you're generating email from a scheduled procedure, and you have a way
to track successes and failures, then ns_sendmail is fine.

On Friday, November 1, 2002, at 12:38 PM, Wes James wrote:


but this is what finally seem to fix the problem.

On Fri, 2002-11-01 at 09:49, Jamie Rasmussen wrote:

   On line of 166 of your sendmail.tcl there is a line with Helo
AOLserver [ns_info hostname].
Could you try changing this to Helo [ns_info hostname] ?



Re: [AOLSERVER] Good reading: Yahoo moving to PHP

2002-10-30 Thread Peter M. Jansson
The article mentions that they stayed away from Java because of the thread
implementation on FreeBSD (presumably 4.x).  Given that AOLserver uses
threads heavily, does anyone have experience running it under FreeBSD?  Is
it OK?  OK under load?



  1   2   3   >