Re: [AOLSERVER] Can't access a previously happy AOLserver.

2004-06-27 Thread Alfred Werner
Maybe you have /etc/hosts file entry on the machine where the gecko is? Or
if on windows - an lmhosts entry? Just guessing - sounds like a real head
scratcher :)

On Sun, 27 Jun 2004, Steve wrote:

 On Sun, 2004-06-27 at 12:35, Dossy wrote:


  I'm at the point where I'm stumped, and a reboot everything, and try
  again is the only suggestion I've got.  Short of that, I'd try
  restarting your DNS server process, and any DNS caches you are running
  on ALL machines involved (dnscache, nscd, etc.) -- esp. on the client
  machines running the web browsers that can't connect to
  steve.festinalente.co.uk.
 


 I've installed Konquerer and tried that on my machine and it works as
 does telnet, so after all that it looks like I have a problem with Gecko
 based browsers on this one machine. Its weird to say the least.
 Something somewhere has got screwed so that gecko can't talk to
 steve.festinalente.co.uk but its absolutely fine with every other url
 I've tried. nsd is still showing as one thread even with several oacs
 connections running so it must be as you said with the newer version of
 procps.

 Anyway thanks for all the assistance.

 - Steve





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

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



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

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


Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Alfred Werner
usr/local/aolserver/bin/nsd -t /web/aolserver/site-config.tcl -b
1.2.3.4:80 -u webuser

works for me in that order.

Naruhodo!


On Sun, 15 Feb 2004, Chris Davies wrote:

 I think you're missing the -b parameter

 -b 1.2.3.4:80

 needs to be on the command line, but there might be some specific order,
 I don't recall specifically.

 On Sun, 2004-02-15 at 20:52, Taguchi, Takeshi wrote:
  Hi,all.
 
  I've try to bind aolserver 4.1 to port 80, but I've got
  permission denied error.


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

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



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

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


Re: [AOLSERVER] Binding to port 80

2004-02-15 Thread Alfred Werner
Is there anything on already on the port? If you have lsof command you can
run lsof -i TCP:80

Regards,
Alfred Werner

On Mon, 16 Feb 2004, Taguchi Takeshi wrote:

 Not work for me ...;(

 Firstly, I type simply

 # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www

 and I got same permission error.

 Then I edit config.tcl as followings:

 set httpport  8080

 and start nsd as following:

 # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www

 Then I got following message:

 [16/Feb/2004:13:57:06][54483.134560768][-nssock:driver-] Warning:
 prebind: closed unused : 10.0.0.6:80 = 3

 Thanks.
 ---
 T, Taguchi



--
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] Binding to port 80

2004-02-15 Thread Alfred Werner
In the second case you have a conflict between command line port and
config file port.

Also - is 10.0.0.0 a valid address?

On Mon, 16 Feb 2004, Taguchi Takeshi wrote:

 Not work for me ...;(

 Firstly, I type simply

 # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www

 and I got same permission error.

 Then I edit config.tcl as followings:

 set httpport8080

 and start nsd as following:

 # bin/nsd -t config.tcl -b 10.0.0.6:80 -u www -g www

 Then I got following message:

 [16/Feb/2004:13:57:06][54483.134560768][-nssock:driver-] Warning:
 prebind: closed unused : 10.0.0.6:80 = 3

 Thanks.
 ---
 T, Taguchi


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

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



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

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


Re: [AOLSERVER] [AS4] ns_getcsv and nsperm

2004-02-10 Thread Alfred Werner
Not sure if it will be useful for you but tcllib has a CSV:: namespace,
and now that aolserver is package aware it might do the trick.

On Tue, 10 Feb 2004, Kevin S. Davis wrote:

 Greetings!  First time poster here, but I have used AS for a number of years.

 I just upgraded from 3.5.something to 4.0.1 and ran into a couple issues I
 haven't seen discussed...

 First, ns_getcsv seems to be gone.  LOL, that's probably a good thing.  I
 was using it when I should know better.  I can implement it if I still need
 it, but it was handy for the quick hack.

 Next, I can't seem to get nsperm to work.  The nsperm module loads fine
 according to server.log and I am using the same perms and passwd files from
 3.5, but AS will serve up an entry from perms without asking for
 authentication.  It's as if it doesn't even read the perms file (the file
 permissions are correct).  What am I missing here?

 Thank you for the help,
 Kevin


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

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



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

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


Re: [AOLSERVER] outgoing http sniffer, http authentication?

2003-09-30 Thread Alfred Werner
Darn - I was trying to remember that name! There was also a little perl
script written by the guy who wrote the CGI module - you could google that
and use it as a base to roll your own..

On Tue, 30 Sep 2003, Michael A. Cleverly wrote:

 On Tue, 30 Sep 2003, Andrew Piskorski wrote:

  I want to look at the outging HTTP protocol traffic of my own browser,
  on Linux, and I do have root access on the machine.  What's the best
  or handiest packet sniffing tool to use for this?  Ones I've heard of
  are tcpdump and ethereal.

 I'd suggest you give SockSpy a try.  See: http://wiki.tcl.tk/sockspy

 Michael


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

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



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

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


Re: [AOLSERVER] VFS and FTP

2003-09-25 Thread Alfred Werner
I've used it with no surprises. Pop-3 works too.

On Thu, 25 Sep 2003 [EMAIL PROTECTED] wrote:

 There's ftp support in tcllib (pure Tcl).
 I haven't tried it from within AOLserver but don't see why it shouldn't
 work.



  -Original Message-
  From: AOLserver Discussion
  [mailto:[EMAIL PROTECTED] Behalf
  Of C.Y Hsu
  Sent: Thursday, September 25, 2003 2:59 AM
  To: [EMAIL PROTECTED]
  Subject: [AOLSERVER] VFS and FTP
 
 
  I got a situation that need to write some files from
  aolserver to a remote
  ftp server, the condition is I can not use NFS mount and must
  catch file
  writing error.
  tclvfs seems can solve this problem, after evaluate tclvfs, I
  can read the
  content of zip file and http web page, but I can not connect
  to a remote
  ftp server.
  Any idea ?
 
 
  --
  AOLserver - http://www.aolserver.com/
 
  To Remove yourself from this list, simply send an email to
  [EMAIL PROTECTED] with the
  body of SIGNOFF AOLSERVER in the email message. You can
  leave the Subject: field of your email blank.
 


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

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



--
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] VFS and FTP

2003-09-25 Thread Alfred Werner
I looked and didn't see any example code laying around. For sure, I did it
under 3.x (maybe 3.2?) by copying the ftp.tcl into my library directory
(have done similarly for http and pop). At that point I think you don't
need a package require - just say ftp::WhateverCommand and you're set ..

Sorry I can't give a specific example, but I know it works in the 3.x
family with no big deal.

Another option you might want to look into is the TCL port of libcurl -
http://curl.haxx.se/libcurl/tcl/

I know on the developer's page he claims to have made it thread safe - I
haven't used the TCL port, but Curl is very well done/maintained and works
in a lot of environments - e.g. PHP includes a curl interface.

I remember seeing somewhere that someone had played with libcurl on 4.x -
if you google it you might get some hits.

Alfred Werner
Schemathings, LLC

On Thu, 25 Sep 2003, Robert Locke wrote:

 Alfred, Tim, and Jean,

 Are you using tcllib within 3.x or 4.x?  Will it work in either or both?
 How do you load it?

 Thanks!

 Rob

   There's ftp support in tcllib (pure Tcl).
   I haven't tried it from within AOLserver but don't see why it shouldn't
   work.


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

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



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

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


Re: [AOLSERVER] libcurl, tclcurl Re: [AOLSERVER] VFS and FTP

2003-09-25 Thread Alfred Werner
I've been waiting patiently for the OACS switch to 4.x so we can use Curl
- it really does seem to be the 'best of breed' tool. With Curl and
tDom all we need is a nice SWIG interface to htmltidy and we can
get/parse/munge any doc on the web!

Alfred Werner
Schemathings, LLC


--
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] ADP Syntax Verification

2003-09-02 Thread Alfred Werner
Wouldn't just running ns_adp_parse on all the ADP files do the trick (with
a catch around it?) If you catch - investigate further..

On Thu, 28 Aug 2003, Dossy wrote:

 On 2003.08.28, John M Wright [EMAIL PROTECTED] wrote:
  In gerneral, we'd like to run a syntax checker on our
  ADPs before deployment to ensure no syntax errors
  made their way through the testing, etc (actaully, this
  would happen before the testing phase).
 
  Specifically, we had an issue where a '$' was missing
  from an ADP variable in a rarely used piece of code.  That
  code was used and created an error (and an unhappy customer).
  It would be nice if we could run our ADPs through a lint-like
  syntax checker that would verify that things like this don't
  happen.  In this case, it wasn't a missing close-brace or
  missing quote, so I don't belive info complete would have
  caught the error.

 I don't think there's any kind of static or dynamic code analysis tool
 that could tell you that invoke_wrath_of_god_on foo should have been
 invoke_wrath_of_god_on $foo.  Actually, maybe you could -- parse a Tcl
 script into words (however you define that) and if any matches a
 variable that has been defined in any scope, display a warning for the
 user running the code inspector to confirm.

 After a hundred or two of these heuristic rules, a pretty decent static
 code analyzer could be born.  Neat idea, John.

 I wonder if the excellent folks at ActiveState already have (and likely,
 sell) a product like this.

 In the meantime, I think better or more rigorous functional testing/QA
 is in order ... unfortunately.

 -- Dossy

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


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

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



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

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


Re: [AOLSERVER] ADP Syntax Verification

2003-09-02 Thread Alfred Werner
It doesn't seem like it would be that hard to create a test harness to set
the appropriate environment for such a run on a per-page basis. A simple
but reliable way to do it would be to add a blah.adp.env file for each
blah.adp that you parse to set whatever you need. Sticking to my 'simple
man' unix command line / makefile mentality you could have multiple per
ADP if you need to test various branches. Could get redundant, but if you
have more than a few branches you should probably refactor anyway.

I guess I can think of two situations where an easy answer doesn't come to
mind - how do you fake the HTTP headers since at least every OpenACS page
needs cookies set - second, how would you test the ones that are written
as tcl pages that explicitly ns_adp_parse afterwards (which I do a lot
of) ... If that is handled, then I think the coverage would be mostly
complete - database, etc should still be fine.



On Tue, 2 Sep 2003, Dossy wrote:

 On 2003.09.01, Alfred Werner [EMAIL PROTECTED] wrote:
  Wouldn't just running ns_adp_parse on all the ADP files do the trick (with
  a catch around it?) If you catch - investigate further..

 Sure, this'd work simple stuff.  What about stuff that interacts with
 the database and wants parameters, and throws errors in the event that
 the required parameters aren't passed?

 In other words, you can't just blindly ns_adp_parse ADP files and have
 it work all the time.

 In the real world, useful code coverage means actually hand-writing
 tests that exercise all code paths of interest.

 -- Dossy

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


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

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



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

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


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

2003-04-04 Thread Alfred Werner
Thanks for the detective work and the fix Scott!

Kudos,
Alfred

On Fri, 4 Apr 2003, Scott Goodwin wrote:

 Problem Report on nscgi Memory Leak:

 !!! THIS IS A MAJOR BUG FOR ANYONE RUNNING CGI SCRIPTS IN AOLSERVER 3.x
 !!!

 This bug exists in released versions of AOLserver 3.x inclusive of
 AOLserver 3.5.1 all the way back to AOLserver 3.0. Any past or current
 reports of AOLserver 3.x growing in size over time should be
 re-examined with this bug in mind.

 The leak has been fixed in the CVS tree for AOLserver 3 (3.5 branch).
 AOLserver 4.x's nscgi module is *not* affected by this problem.

 If you wish to fix the problem in your current version of AOLserver
 3.x, edit the aolserver/nscgi/nscgi.c file, find the CgiExec function,
 and delete the call to Ns_DStringInit(dsPtr);. Then recompile your
 server. Here is what it looks like in context:

  /*
   * Set all the CGI specified variables.
   */

  Ns_DStringInit(dsPtr);
  SetUpdate(cgiPtr-env, SCRIPT_NAME, cgiPtr-name);
  if (cgiPtr-pathinfo != NULL  *cgiPtr-pathinfo != '\0') {
  Ns_DString tmp;
  ...

 Notes:

 The leak occurred in the CgiExec function of nscgi.c. The nscgi.c file
 defines a function called CgiDs which does an Ns_DStringPop to obtain a
 dstring, and then uses that dstring's 'addr' member to maintain a
 linked-list of dstrings that nscgi is currently using. At the end of
 the CGI process, the CgiFree function is called to walk through that
 linked-list and perform an Ns_DStringPush on each of the dstrings to
 put them back into the thread's local dstring pool.

 The memory leak was caused when Ns_DStringInit was called and passed a
 dstring obtained by a previous call to CgiDs. The Ns_DStringInit call
 broke the linked-lisk because it NULL'd the addr member of the dstring,
 which had been pointing to the next dstring in the linked-list. The
 effect was that every invocation of of a CGI script was causing
 dstrings to be left dangling in memory.

 This problem *does not* exist in AOLserver 4.x because nscgi no longer
 uses Ns_DString's addr member to maintain the linked list.



 /s.


 --
 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/



--
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 Alfred Werner
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

Alfred

On Fri, 28 Mar 2003, Alexander Leyke wrote:

 Hello,

 Tcl command ns_http queue $method $url causes access violation in
 Aolserver 4.0 beta 4  - note missing headers parameter in the command.
 The access violation is due to variable hdrs left uninitialized in the
 following block of code

 line 126:
 case HQueueIdx:
 if (objc  4 || objc  6) {
 Tcl_WrongNumArgs(interp, 2, objv, method url ?body?
 ?headers?);
 return TCL_ERROR;
 }

 method = Tcl_GetString(objv[2]);
 url= Tcl_GetString(objv[3]);

 if (objc  4) {
 body = Tcl_GetString(objv[4]);

 if (objc  5) {
 if (Ns_TclGetSet2(interp, Tcl_GetString(objv[5]), hdrs)
 != TCL_OK) {
 return TCL_ERROR;
 }
 }
 else {
 hdrs = NULL;
 }
 }
 else {
 body = NULL;
 }

 Last else block needs hdrs=NULL; statement.


 --
 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/



--
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 Alfred Werner
I'm close .. I'll need it for a project right after the one I'm finishing
up :) Any pointer to a good doc to show me what layer of interface you're
talking about or a module that is similar/at the same layer? I take it the
TCLcurl is a hand-rolled SWIG-ish kind of interface to the underlying C
libs. The API looks like it covers basically all the underlying calls.

Alfred


--
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/


[AOLSERVER] TCLcurl .. WAS Re: [AOLSERVER] Bug in tclhttp.c

2003-03-28 Thread Alfred Werner
Roger dodger ... I'm just in the light research phase thinking about what
I'll need for an upcoming project - doesn't seem like a big deal - it
never is :) When I get to that point (or if I have some free time this
weekend) I'll post here about how nicely it plays with aolserver.

On Fri, 28 Mar 2003, Tom Jackson wrote:

 Alfred Werner wrote:

 They claim to be thread safe...
 
 There is a TCL wrapper at
 http://personal1.iddeo.es/andresgarci/tclcurl/english
 
 

 What more do you need to do? If this a package, just load into
 AOLserver4.0 and be done with it. If it isn't, look at it to see how to
 make it into a tcl package.

 --Tom Jackson


 --
 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/



--
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] Tcl profiling suggestions with AOLserver?

2003-03-20 Thread Alfred Werner
http://sdm.openacs.org/wp/display/140/ has a good presentation on a
different approach to profiling. (I just happen to have the printout
next to my keyboard :)

Regards,
Alfred Werner

On Thu, 20 Mar 2003, Eric Larkin wrote:

 We are using AOLserver (3.4.2 with a ported version of the ACS encoding
 patches) in our production environment, and have reached the point where we
 would like to profile our Tcl code to find procs that could be optimized or
 rewritten.  We're particularly interested in a report that looks something
 like this:

 
 Procedure   Calls   Real Time   CPU Time
 
 some_proc   2   88982   6904
 another_proc2   39392   3202
 yet_another_proc2   50329   2032

 We've identified nsprofile (http://acs-misc.sourceforge.net/nsprofile.html)
 as a module which would provide this functionality, but I'm a little worried
 by the documentation, which lists as a pending task: limiting the number of
 profile data kept. Right now it's unlimited so eventually we'll eat all the
 memory available.

 We also have some pages that seem to have excessively large memory usage in
 production, so we are also interested in monitoring and/or logging the
 amount of memory used by each http request and/or proc execution.  However,
 we haven't found any tools to do so.

 Does anyone have experience using nsprofile in a production environment?
 Are there other tools (or other ways of solving the same problem) that we
 should consider?

 Thanks in advance,

 Eric Larkin
 Chief Technology Officer
 Arena Solutions, Inc.  (formerly bom.com)
 [EMAIL PROTECTED]


 --
 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/



--
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/