========================================================================= Date: Thu, 1 Apr 1999 14:56:35 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: thread max 50 revisited In-Reply-To: <199904010507.AAA18083@services.web.aol.com> (message from Automatic digest processor on Thu, 1 Apr 1999 00:01:30 -0500) > We are using AOL Server 2.2 and have been seeing many occurrences of "thread > max (50) reached with x connections waiting" in our server.log file. That just means that you've hit the ThreadMax configuration parameter which specifies the maximum number threads that the virtual server can use to service requests. If all of your connection threads are in use, and more connections come in and get queueued, you'll see this message. What would interesting to find out would be why all those threads are in use. It just may be the site is extremely busy, in which case increasing the ThreadMax may help things. If the site isn't extremely busy, then there may be something wrong, such as something blocking the threads > We are making a socket connection to a remote host. Such as making a socket connection to a remote host :-) If you own (or know who owns) that remote host, make sure that it can respond to you connections in a timely manner. If you don't own that host, you may want to use a timeout when connecting to it. Better to give the user a 'sorry, cannot complete your request because our remote host is wedged' than to leave them staring at a blank screen. If that's not practical, you can use the 'busy threads' stuff, which goes like this: * if all of the threads are busy (i.e. ThreadMax is hit) * And the number of connections in the queue is over a configurable amount * then issue a quickie "busy" reponse and remove that request from the queue. Once the queue drains and connection threads get freed up, they'll start servicing request as normal. (look for maxBusyThreads and MaxWait in the admin guide configuration file reference) Lastly, you may want to turn CheckStats=on in [ns/server/server-name]. It'll peridoically write some 'health of the server' information to the server.log, and you can get information like the # of connections queued, and number of threads in use, which can help you tune your application. Cheers, ++Mark Dalrymple, ArsDigita "3. Send large donations, checks, and money orders to the author of the FAQ, or the moderator of the group, whichever you prefer. Then, cross the top question off the FAQ, answer the question at the bottom, and mail it to three people. Within two weeks, you will receive 729 answers to various questions! Do not break the chain; Emily Postnews broke the chain, and now no one listens to her." -- Peter Seebach, from The *other* C FAQ ========================================================================= Date: Thu, 1 Apr 1999 17:18:50 -0500 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Ken Overton Subject: Is this list archived? In-Reply-To: <199903240505.AAA06658@services.web.aol.com> from "Automatic digest processor" at Mar 24, 99 00:01:32 am MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I'd like to read through old postings to see if my questions have already been answered. Where can I find an archive of the list? -- kov ========================================================================= Date: Thu, 1 Apr 1999 14:04:05 -0800 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: jim@rubylane.com Subject: exec hangs on Linux In-Reply-To: <19990401145635.29615.qmail@waltham2.arsdigita.com> from "Mark Dalrymple" at Apr 1, 99 02:56:35 pm Content-Type: text Has anyone implemented FastCGI for AOLServer? On Linux, [exec hangs sometimes, I think because of bugs in libpthreads and the exec kernel call. The exec will hang on pipe_read, loop in sched_yield in pthreads, or other undesirable behavior. There is a kernel patch that helps, but things still aren't 100%. I was thinking, it'd be cool to be able to send an exec command line to a FastCGI server w/socket calls instead. Anyone? Jim ========================================================================= Date: Fri, 2 Apr 1999 15:17:43 -0500 Reply-To: Robert.Garron@Access3000.net Sender: Web Development with AOLserver From: Robert Garron Organization: Access3000, Inc. Subject: Re: AOLSERVER Digest - 31 Mar 1999 to 1 Apr 1999 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To AOL - holder of a great Web Server and Service to the Internet as a whole: I have been using the AOLserver for around 4 years and have been quite convinced that it is the best one available to serve Web Pages in a secure manner. Now that AOL owns Netscape, I too am worried (as one of your other supporters/users have also raised this question in an earlier listserve) that AOL may drop the support and continued upgrades for the server to the community of your AOLserver users. What are the current plans for the continued use of the AOLserver by AOL (primehost) and AOL in general? Would AOL consider taking Netscape's lead in releasing the source to make it "open source" to the world?; or at least have the option of your community to sign over our first borns to have access to the source code and thus less stress in using the server? Since we (the community) have helped debug, develop, and suggest additions and improvements over the years to create a truly great server, I would like to see the open source model adopted. The reason why I raise this issue is that we have spent a great deal of time and money developing scripts and support packages for the server for our own internal use and I would not like to see our efforts crushed and money wasted. If we are to be crushed, I would like to know sooner than later, so I can at minimum create a plan to migrate to say Apatche, or even to Netscape Server. None the less, a clear path for either continued releases and support, a definite termination date, or something in between needs to be stated, since the very survival of your user community may be at stake. Again, I (and I am sure that other AOLserver users would also) would be willing to sign some fair Non-Disclosure to obtain and have the source code available to them as the Internet becomes more global. Considering that and "hopefully" both operating systems and Web servers will be open source and free to the Internet community. Regards to all of the programmers, writers, and developers of the AOLserver, Robert Garron -- |************************************************| | | Robert Garron, M.E. C.S.E. | President & CEO | Access3000, Inc. | 12 Anpell Drive | Scarsdale, New York 10583 | http://www.Access3000.net/ | E-mail: Robert.Garron@Access3000.net | Voice: 914-472-2374 or 914-722-0733 | Fax: 914-725-5403 | Pager: 1-800-777-4681 PIN: 3767958 | |************************************************| ========================================================================= Date: Wed, 7 Apr 1999 07:10:03 +0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: sorenson Subject: Questions MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 1. Are there plans to develop allow an integrated Perl interpreter (like the integrated TCL interpreter currently available in AOLserver, or the mod_perl of Apache). There are lots of nice modules for Perl -I really like the convenience of CGI.pm for forms. 2. Is there an existing driver for MySQL? Thanks, Jeff Sorenson ========================================================================= Date: Wed, 7 Apr 1999 15:37:30 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Kerry Barlow Subject: NT users? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" hello: Are there any AOL, NT users left in this group? I would be happy to hear from any of you out there. Sincerely Kerry Admin@MntnWeb.Com WWW server hosting Http://mntnweb.com Binghamton online Webcam Http://MntnWeb.Com/bing.htm CHRISTMAS Web Page Http://mntnweb.com/xmas.htm ========================================================================= Date: Wed, 7 Apr 1999 18:18:44 -0500 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "J. Michael Roberts" Subject: Re: NT users? Comments: To: Kerry Barlow In-Reply-To: <1.5.4.32.19990407193730.00bb49b0@servtech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Yep. Why do you ask? I've never used it in a production environment because NT just isn't that stable, but we mirror our production environment on NT laptops for sales demos. On Wed, 7 Apr 1999, Kerry Barlow wrote: > hello: Are there any AOL, NT users left in this group? I would be happy to > hear from any of you out there. > Sincerely > Kerry > Admin@MntnWeb.Com > WWW server hosting > Http://mntnweb.com > Binghamton online Webcam Http://MntnWeb.Com/bing.htm > CHRISTMAS Web Page Http://mntnweb.com/xmas.htm > ========================================================================= Date: Thu, 8 Apr 1999 14:33:54 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Powell, William H (Bill), HRBEF" Subject: Re: AOLSERVER Digest - 2 Apr 1999 to 7 Apr 1999 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Been using AOLServer NT (3.52) for over 2 and a half years - in a multi-host production environment (AOLServer with 7 IP'd sites, mail and list server, ftp server...) with absolutely NO problems with either NT or ANY well-written NT services, and AOLServer NT is a VERY well written hunk of code. I believe that, besides choosing properly-written programs, the "secret" is that the server is a SERVER - no users, no desktop - it's never logged in. It sits in the server closet, outside the firewall and everything runs as services. A shame the AOL Server folks sold out. Ok well... Bill Powell whp@att.net > Date: Wed, 7 Apr 1999 15:37:30 -0400 > From: Kerry Barlow > Subject: NT users? > > hello: Are there any AOL, NT users left in this group? I > would be happy to > hear from any of you out there. > Sincerely > Kerry > Admin@MntnWeb.Com > WWW server hosting > Http://mntnweb.com > Binghamton online Webcam Http://MntnWeb.Com/bing.htm > CHRISTMAS Web Page Http://mntnweb.com/xmas.htm > > ------------------------------ > > Date: Wed, 7 Apr 1999 18:18:44 -0500 > From: "J. Michael Roberts" > Subject: Re: NT users? > > Yep. Why do you ask? I've never used it in a production environment > because NT just isn't that stable, but we mirror our production > environment on NT laptops for sales demos. ========================================================================= Date: Fri, 9 Apr 1999 03:32:53 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: mike chan Subject: AOLServer and Oracle In-Reply-To: <199904090406.AAA22308@services.web.aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" does anyone know what the DATASOURCE for the oracle driver is supposed to look like? mike chan Snotty e/c ========================================================================= Date: Fri, 9 Apr 1999 15:19:22 -0600 Reply-To: Keith Paskett Sender: Web Development with AOLserver From: Keith Paskett Subject: Re: AOLServer and Oracle MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii This one took mee a while to figure out too. It is just the Oracle SID. The same as the ORACLE_SID environment variable is set to. You will also need to set the User and Password parameters |Approved-By: jeff@AM.NET |X-Sender: snotty@pop.ben2.ucla.edu |Mime-Version: 1.0 |Approved-By: mike chan |Date: Fri, 9 Apr 1999 03:32:53 -0700 |From: mike chan |Subject: AOLServer and Oracle |To: Multiple recipients of list AOLSERVER | |does anyone know what the DATASOURCE for the oracle driver is supposed to look like? | |mike chan |Snotty e/c ------ Keith Paskett keith.paskett@SDL.USU.EDU Space Dynamics Laboratory PGP encrypted mail preferred 1695 North Research Parkway 435-797-4195 Logan, Utah 84341 http://cal.sdl.usu.edu/~paskett ========================================================================= Date: Sat, 10 Apr 1999 04:40:15 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Larry W. Virden" Subject: Re: aolserver and nt In-Reply-To: Your message of Thu, 8 Apr 1999 14:33:54 -0400 It is so strange that when vendors support NT but not other OSes no one thinks twice, but when someone supports Unix but not NT they are called 'sell outs'. NT takes a LOT more investment for a vendor to support and develop than does Unix. It makes sense that intelligent developers drop NT like a hot potato and go with an OS that requires less investment. -- Larry W. Virden <*> O- "No one is what he seems." Unless explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. ========================================================================= Date: Sun, 11 Apr 1999 04:50:02 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: aolserver and nt In-Reply-To: <199904110405.AAA08117@services.web.aol.com> (message from Automatic digest processor on Sun, 11 Apr 1999 00:01:39 -0400) not to get in the middle of the whole platform religion thing, but the primary reason why NT support was dropped was that AOL is a unix shop, and it didn't make any business sense to divert the (extremely) limited resources to maintianing it after NaviSoft was acquired. ++Mark Dalrymple, ArsDigita "I'm just offering my thoughts and opinions. They dont necessarily reflect a reality." -- Eric Wiseblatt ========================================================================= Date: Sat, 10 Apr 1999 14:06:05 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: AOLserver and Oracle In-Reply-To: <199904100406.AAA29700@services.web.aol.com> (message from Automatic digest processor on Sat, 10 Apr 1999 00:01:45 -0400) > does anyone know what the DATASOURCE for the oracle driver is supposed > to look like? We just leave it blank (but it needs to be there.) e.g. [ns/db/pool/main] Driver=ora8 Connections=4 DataSource= User=alex Password=woofwoof Verbose=On ExtendedTableInfo=On Cheers, ++Mark Dalrymple, markd@arsdigita.com "Internet chat is one of satan's tools, contributing to the global lobotimization of youth even more so that USENET, and providing future rehabilitative surgeons a financial bonanza of carpal tunnel, lower back, and neck disorders." -- rolf@gitdown.com ========================================================================= Date: Sat, 10 Apr 1999 09:36:28 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: jim@rubylane.com Subject: Re: aolserver and nt In-Reply-To: <9904100440.AA4558@cas.org> from "Larry W. Virden" at Apr 10, 99 04:40:15 am Content-Type: text I for one am glad that AOL decided to drop NT and pick up Linux. We have been using this combination in a production environment with 1.1M hits/week for a year now and other than a problem with exec's (bugs in Linux I believe), it has been rock solid. We're co-located and don't have physical access to our servers, so using NT with its frequent reboot requirements, would be impossible. Jim www.rubylane.com ========================================================================= Date: Mon, 12 Apr 1999 09:14:43 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Kriston J. Rehberg" Subject: Re: aolserver and nt In-Reply-To: <199904120400.AAA17091@services.web.aol.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit >I for one am glad that AOL decided to drop NT and pick up Linux. We >have been using this combination in a production environment with 1.1M >hits/week for a year now and other than a problem with exec's (bugs in >Linux I believe), it has been rock solid. Thanks, but to clarify: we didn't "drop NT and pick up Linux." In actuality, we have been distributing the 2.x generation of AOLserver on Linux since 1996. There was a Linux port of the 1.x version well before that as well. So, as you can see, we have been actively developing AOLserver for Linux for many years before the RedHat Hype Engine kicked in. We decided to drop NT after AS 2.1 for the reasons Mark has said. AOLserver also happens to be available for another inexpensive hardware platform -- Solaris x86 -- and it's identical to the SPARC version. Kris -- Kriston J. Rehberg Systems Development http://kriston.net/ America Online, Inc. endeavor to persevere ========================================================================= Date: Mon, 12 Apr 1999 15:53:17 -0700 Reply-To: aabedi@gseis.ucla.edu Sender: Web Development with AOLserver From: Ali Abedi Organization: UCLA Subject: AOL loading problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Does anybody know why I get this error every time I start AOLServer: [12/Apr/1999:15:49:43 -0700][2920] Notice: AOLserver/2.3.3 starting. *** Exception caught in thread 2922 - invoking exception callbacks *** I was working just fine a while ago, but now it seems that it doesn't want to load, I running RedHat 5.2 Linux with 2.2.5 kernel. Any help is appreciated. Thanks Ali Abedi ========================================================================= Date: Mon, 12 Apr 1999 19:51:07 -0500 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "J. Michael Roberts" Subject: Re: AOL loading problem Comments: To: Ali Abedi In-Reply-To: <3712795D.AA2A65F@gseis.ucla.edu> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Could conceivably be a problem with your nsperm permissions; I've experienced similar problems along those lines. Make sure the files are valid. (That's what I'd do first.) On Mon, 12 Apr 1999, Ali Abedi wrote: > Does anybody know why I get this error every time I start AOLServer: > > [12/Apr/1999:15:49:43 -0700][2920] Notice: AOLserver/2.3.3 starting. > > > *** Exception caught in thread 2922 - invoking exception callbacks *** > > I was working just fine a while ago, but now it seems that it doesn't > want to load, I running RedHat 5.2 Linux with 2.2.5 kernel. Any help is > appreciated. > Thanks > Ali Abedi > ========================================================================= Date: Mon, 12 Apr 1999 18:03:26 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: jim@rubylane.com Subject: Re: AOL loading problem Comments: To: aabedi@gseis.ucla.edu In-Reply-To: <3712795D.AA2A65F@gseis.ucla.edu> from "Ali Abedi" at Apr 12, 99 03:53:17 pm Content-Type: text I had a similar problem when I added a second virtual server, but that was with an older version of AOLServer, like 2.3.0/1. Maybe that bug has crept back into 2.3.3. I'm running 2.3.2 with two V.S. (RedHat 5.0, 2.0.36 kernel) and it's working fine, except that it reports the wrong virtual server names in the log files. Jim > > Does anybody know why I get this error every time I start AOLServer: > > [12/Apr/1999:15:49:43 -0700][2920] Notice: AOLserver/2.3.3 starting. > > > *** Exception caught in thread 2922 - invoking exception callbacks *** > > I was working just fine a while ago, but now it seems that it doesn't > want to load, I running RedHat 5.2 Linux with 2.2.5 kernel. Any help is > appreciated. > Thanks > Ali Abedi > ========================================================================= Date: Mon, 12 Apr 1999 23:02:29 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: mike chan Subject: aolserver and oracle In-Reply-To: <199904130406.AAA26134@services.web.aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" i tried using the oracle_sid as the datasource, but i'm still having problems... [12/Apr/1999:22:56:43 -0700][26585.24501][fusion] Notice: Viewing last 2048 bytes from log: /usr/local/AOLServer/log/server.log [12/Apr/1999:22:56:54 -0700][26585.24501][fusion] Notice: Ns_DbOpenDb(oracle): Opening datasource: oracle [12/Apr/1999:22:56:57 -0700][26585.24501][fusion] Error: ora8.c:713:ora_open_db: error in `OCIServerAttach ()': NULL connection SQL: [nil] where, [oracle@fusion ~]$ echo $ORACLE_SID oracle how would you use a remote database (ie... tcp/ip, host.domain, port 1521) also, does the ORACLE_SID environment label have to be set before starting the web server? here's the oracle listener status... LSNRCTL> status fusion Connecting to (ADDRESS=(PROTOCOL=TCP)(HOST=fusion)(PORT=1521)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 8.0.5.0.0 - Production Start Date 12-APR-99 14:26:33 Uptime 0 days 8 hr. 38 min. 31 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /oracle/database/network/admin/listener.ora Listener Log File /oracle/database/network/log/listener.log Services Summary... extproc has 1 service handler(s) oracle has 1 service handler(s) The command completed successfully LSNRCTL> status Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=oracle)) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 8.0.5.0.0 - Production Start Date 12-APR-99 14:26:33 Uptime 0 days 8 hr. 38 min. 34 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /oracle/database/network/admin/listener.ora Listener Log File /oracle/database/network/log/listener.log Services Summary... extproc has 1 service handler(s) oracle has 1 service handler(s) The command completed successfully LSNRCTL> Snotty e/c ========================================================================= Date: Tue, 13 Apr 1999 12:29:11 EDT Reply-To: ThomasGyorfi@cs.com Sender: Web Development with AOLserver From: Thomas Gyorfi Subject: Aolserver and C++ exceptions MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi, I'm running AOLserver 2.3.3 on a DEC Alpha running OSF1 v4.0, and I have a problem with developing modules for it. I have some C++ code I need to port to it, and it works fine except when using structured exceptions. Whenever I need to throw an exception, instead of letting the module code catch it transparently to the server as it is designed to do, AOLserver logs that it has trapped an exception and is executing callback functions, and then it promptly crashes the whole server. Does anyone know how I can let AOLserver trust that modules will handle exception conditions themselves? I really don't want to have to rewrite all this code to not use the throw/catch mechanism because this would necessitate rewriting the code for the other webserver platforms we support as well (Apache, IIS, Netscape). Thanks, - Tom ========================================================================= Date: Tue, 13 Apr 1999 14:12:10 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: AOL loading problems In-Reply-To: <199904130406.AAA26134@services.web.aol.com> (message from Automatic digest processor on Tue, 13 Apr 1999 00:02:55 -0400) > Does anybody know why I get this error every time I start AOLServer: > [12/Apr/1999:15:49:43 -0700][2920] Notice: AOLserver/2.3.3 starting. > *** Exception caught in thread 2922 - invoking exception callbacks *** That's a generic "Help! I crashed" message. Something Somewhere is generating a bus error or a segV. Here's what I'd do to track it down: * Set catchExceptions=on in [ns/parameters] (this will allow AOLserver to just drop a core file rather than trying to catch the error and attempt to clean up) * Assuming you do get a core file, look at it in gdb and do a 'where' to get a stack trace. Hopefully there's something obvious (if you see "permission" or "perm" in there, you'll know ns_perm is blowing chow). If you see "sigwait" or something like that at the top of your stack, that's just the generic signal handler and isn't the cause of the problem. * If the core file isn't useful, run AOLserver from within gdb: * start gdb: % gdb bin/nsd * run without the child process: (gdb) run -N -fc ./nsd.ini (You may want to modify your nsd.ini to have nssock listen to a high port so that you don't have to run this session as root. running a debugger as root gives me the heebie jeebies) * and see what happens. You should get a 'Signal SEGV caught' and can then look at the stack. I've had good luck with this technique Another approach is to start commenting out *.so modules in your nsd.ini and see where it stops barfing. if you take out nsperm.so and can start up correctly, that's a good indication something's wrong in there. There were some changes to nsperm from 2.3.2 to 2.3.3, so it's possible that errors got introducted. Cheers, ++Mark Dalrymple, ArsDigita. markd@arsdigita.com "I am sure you have all seen those "Raid Jackets" on the TV cop shows. The ones that say DEA, SHERIFF, POLICE, PARAMEDIC etc. Well, I want one that says SUSPECT. I will keep it in the car. Then when I drive past a cop scene, I will get out of the car, put on my SUSPECT raid jacket and stand around. I wonder what they will do when they realise, that not only do the good guys now have jackets so you can spot them, but the bad guys do too." -- Julian Macassey ========================================================================= Date: Tue, 13 Apr 1999 22:55:15 +0800 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: edmas Subject: Re: AOLSERVER Digest - 11 Apr 1999 to 12 Apr 1999 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit hi all, I started using AOLpress since Navipress time. It remains as one of the best Web Editor that I come across. However, it looks like there is no further development work after AOLpress 2.0. Will there be any new versions coming out? I am looking forward to layers support in AOLpress. AOLserver has been great, however, as I never managed to pick up Linux, I did actually look into it since the support for NT was dropped. I was disappointed as AOLserver for NT was a great product as well. Regards. Edmas ========================================================================= Date: Tue, 13 Apr 1999 13:10:47 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: jim@rubylane.com Subject: Re: Aolserver and C++ exceptions Comments: To: ThomasGyorfi@cs.com In-Reply-To: from "Thomas Gyorfi" at Apr 13, 99 12:29:11 pm Content-Type: text Try: CatchExceptions=Off in nsd.ini, section [ns/parameters]. Don't know if that'll fix your problem, but we run our production servers this way. Jim > > Hi, I'm running AOLserver 2.3.3 on a DEC Alpha running OSF1 v4.0, and I have > a problem with developing modules for it. I have some C++ code I need to port > to it, and it works fine except when using structured exceptions. Whenever I > need to throw an exception, instead of letting the module code catch it > transparently to the server as it is designed to do, AOLserver logs that it > has trapped an exception and is executing callback functions, and then it > promptly crashes the whole server. > Does anyone know how I can let AOLserver trust that modules will handle > exception > conditions themselves? I really don't want to have to rewrite all this code > to not use > the throw/catch mechanism because this would necessitate rewriting the code > for > the other webserver platforms we support as well (Apache, IIS, Netscape). > Thanks, > > - Tom > ========================================================================= Date: Wed, 14 Apr 1999 17:03:46 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: AOLserver and C++ exceptions In-Reply-To: <199904140406.AAA06893@services.web.aol.com> (message from Automatic digest processor on Wed, 14 Apr 1999 00:01:44 -0400) > I have some C++ code I need to port > to it, and it works fine except when using structured exceptions. > ... > AOLserver logs that it has trapped an exception the terminology is getting overloaded. The exception AOLserver is talking about is something catastrophic like a SEGV or bus error. It's not related to C++ throw/catch exceptions. > Whenever I > need to throw an exception, instead of letting the module code catch it > transparently to the server as it is designed to do I wasn't able to parse that sentence. If you're expecting a throw() to propagate out of the C++ code and be caught inside of AOLserver, that won't work. (AOLserver's written in C, and it's dangerous to yank stack frames out from under C code - since there's no concept of destructors, things can be left in an indeterminate state) It's been a couple of years since I last did hardcore C++ work, but we always made sure that exceptions don't propagate past library boundries. (in this case C++ callbacks being invoked by the Macintosh toolbox) What you should be able to do is put a catch around the code that's your glue between the C++ code and AOLserver. In another thread, I posted some things about using a debugger to see what's going on. That works as well on the Alphas (using ladebug). In fact, the Alphas are really nice to debug on because ladebug groks threads. (but stack problems are a nightmare to deal with) Cheers, ++Mark Dalrymple, ArsDigita. markd@arsdigita.com "When the only tool you've got is a rubber hammer, everything looks like a knee." -- Lee Rudolph ========================================================================= Date: Wed, 14 Apr 1999 17:06:45 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: aolserver and oracle In-Reply-To: <199904140406.AAA06893@services.web.aol.com> (message from Automatic digest processor on Wed, 14 Apr 1999 00:01:44 -0400) > also, does the ORACLE_SID environment label have to be set before > starting the web server? Yep. We set ORACLE_HOME, ORACLE_BASE, LD_LIBRARY_PATH, ORACLE_SID, and ORACLE_TERM in our AOLserver environment. (we've got a little shell script that sets those and then exec's nsd) ++Mark Dalrymple, ArsDigita. markd@arsdigita.com "Love is a snowmobile racing across the tundra and then suddenly it flips over, pinning you underneath. At night, the ice weasels come." -- Nietzsche, (after Groening) ========================================================================= Date: Wed, 14 Apr 1999 16:21:13 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Kerry Barlow Subject: Robots, how to stop? Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" hello all: I am getting an awful lot of web robots hitting my site and would like to know how to prevent them. I created a robots.txt file and placed it in the root directory of my server. I tried the following command with no success User-agent: * Disallow: / According to the robots exclusion principal this should prevent any robots,however it did not work. How else can I stop these annoying bandwidth hogs? I get anywheres from 10-20 meg per day going out to nothing but robots! This is a major problem for me on a low bandwidth connection. Some of the robots I can do a reverse DNS on them and get there name,but its generally cryptic and I cant find the actual website using the robot. Thankyou all for advise! Sincerely Kerry Admin@MntnWeb.Com WWW server hosting Http://mntnweb.com Binghamton online Webcam Http://MntnWeb.Com/bing.htm CHRISTMAS Web Page Http://mntnweb.com/xmas.htm ========================================================================= Date: Wed, 14 Apr 1999 15:49:29 -0500 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "J. Michael Roberts" Subject: Re: Robots, how to stop? Comments: To: Kerry Barlow In-Reply-To: <1.5.4.32.19990414202113.00a7a534@servtech.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Heh. You must be the target of so-called "rude" robots, ones which ignore the robots.txt file. These are often poorly-written email harvesters for spammers. You probably don't want to exclude *all* robots, as those would include search engines, which you presumably want to keep. And as it stands you've locked the good robots out while allowing the problem to continue. If the reverse lookup gives you something like t004-su-us-ri-da.uu.net, for instance, it's probably some spamming schmuck sitting in his doublewide getting ready to spam all of your customers. Are you logging the User Agent in your access logs? (If not, do so; it's very useful information, although it does inflate your logs.) There are a couple of things to do about rudebots like this. First, you can identify the IPs they're striking from and exclude those IPs. (I think support for this is already built into AOLserver? Anyone?) Or you can build a robot trap, which with fairly minimal overhead to your server, will hopefully tie up the owner of the bot until he or she just gives up on your site. Which, of course, would be a lot more fun. If you're interested in working together to solve this, please feel free to get back to me. Heh, heh. On Wed, 14 Apr 1999, Kerry Barlow wrote: > hello all: I am getting an awful lot of web robots hitting my site and would > like to know how to prevent them. I created a robots.txt file and placed it > in the root directory of my server. I tried the following command with no > success > User-agent: * > Disallow: / > > According to the robots exclusion principal this should prevent any > robots,however it did not work. > How else can I stop these annoying bandwidth hogs? I get anywheres from > 10-20 meg per day going out to nothing but robots! > This is a major problem for me on a low bandwidth connection. Some of the > robots I can do a reverse DNS on them and get there name,but its generally > cryptic and I cant find the actual website using the robot. > Thankyou all for advise! > > > > Sincerely > Kerry > Admin@MntnWeb.Com > WWW server hosting > Http://mntnweb.com > Binghamton online Webcam Http://MntnWeb.Com/bing.htm > CHRISTMAS Web Page Http://mntnweb.com/xmas.htm > ========================================================================= Date: Thu, 15 Apr 1999 10:52:19 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Kriston J. Rehberg" Subject: Re: Robots, how to stop? In-Reply-To: <199904150403.AAA17016@services.web.aol.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Investigate the nsperm module which lets you reject users from IP address ranges or domains. Since spammers rarely move from region to region, you can pick a domain in a certain area (it's mostly Microsoft Network customers on those UUNET dialups you're referring to, and the region is easy to identify from the host name). Another reason you might be seeing lots of traffic is by having links on your error pages. Some spam harvesting robots will follow any page no matter whether it's an error page or not. Take the links out of your error pages, or just have one link that brings the user back to your top page. Kris -- Kriston J. Rehberg Systems Development http://kriston.net/ America Online, Inc. endeavor to persevere ========================================================================= Date: Thu, 15 Apr 1999 22:26:26 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: The Voks Sayeth Subject: Need Advice: Using SSL with non-verisign CA ? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi all, Has anyone tried to set up the SSL module to work with a CA other than verisign. Basically what I have is a CA that can take a pkcs#10 (not PEM) request and create a DER certificate. I will also have a *separate* file containing the CA 's certificate in DER form. I can load the CA cert as a trusted cert into my browser and looks like the SSL module will convert the server certificate from DER to PEM. So looks like what I am missing is a tool to convert the PEM cert request into DER.. So my questions are: 1) Does this approach seem like it will work ? 2) Can anyone suggest to me some pointers to utilities that will do this conversion for me ? Is there a better approach ? thanks in advance, arun _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ========================================================================= Date: Fri, 16 Apr 1999 15:22:48 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Matt Churilla Subject: Aolserver and the OS MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" I have recently been looking at tuning our Solaris box to work better as a web server. I dug up some documentation that said there are problems when using select() and having more than 1024 file descriptors and that this problem does not occur if the poll() function is used instead. Does anyone know if aolserver uses select() or poll() when dealing with connections? Also if anyone knows if any system tuning that specifically helps the performance of aolserver any help would be appreciated. -Matt Churilla ========================================================================= Date: Sat, 17 Apr 1999 04:29:02 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: markd@arsdigita.com Subject: Re: AOLSERVER Digest - 15 Apr 1999 to 16 Apr 1999 In-Reply-To: <199904170407.AAA10923@services.web.aol.com> (message from Automatic digest processor on Sat, 17 Apr 1999 00:03:22 -0400) > know if aolserver uses select() or poll() when dealing with connections? select(). we set FD_SETSIZE to 4096 when compiling, so you should be able to get that many fd's (assuming they got set in the right place in the compilation) Since Solaris wasn't a primary platform during my AOLserver days, we didn't do any tuning or performance testing. Cheers, ++Mark Dalrymple, ArsDigita. markd@arsdigita.com "BLAZEMONGER animates at 200 FRAMES PER SECOND -- so blindingly FAST that you need TWO MONITORS just to WATCH THE INTRO!!!" -- BLAZEMONGER user's guide ========================================================================= Date: Sat, 17 Apr 1999 00:32:00 -0400 Reply-To: philg@mit.edu Sender: Web Development with AOLserver From: Philip Greenspun Subject: Re: AOLSERVER Digest - 15 Apr 1999 to 16 Apr 1999 In-Reply-To: <199904170406.AAA10911@services.web.aol.com> (message from Automatic digest processor on Sat, 17 Apr 1999 00:03:22 -0400) Date: Thu, 15 Apr 1999 22:26:26 -0700 From: The Voks Sayeth Subject: Need Advice: Using SSL with non-verisign CA ? Hi all, Has anyone tried to set up the SSL module to work with a CA other than verisign. Basically what I have is a CA that can take a pkcs#10 (not PEM) request and create a DER certificate. I will also have a *separate* file containing the CA 's certificate in DER form. I can load the CA cert as a trusted cert into my browser and looks like the SSL module will convert the server certificate from DER to PEM. So looks like what I am missing is a tool to convert the PEM cert request into DER.. So my questions are: 1) Does this approach seem like it will work ? 2) Can anyone suggest to me some pointers to utilities that will do this conversion for me ? Is there a better approach ? We use the MIT certificate authority and they are able to take AOLserver cert requests and turn them into something that works. I'm not sure that they think they are doing anything special. Philip ========================================================================= Date: Sat, 17 Apr 1999 11:13:59 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Kerry Barlow Subject: access log,prevent logging of URL Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Hi all: Is there a way in AOL to prevent the access log from recording a certain URL/webpage? I have people using a chatroom running on my server. This chatroom sends out html pages of dialog every 5 seconds to whomever is logged in. Needless to say the access log fills up with these message/html pages. In case you wonder why such a messy chatroom system. it is because some people use WebTV and they cannot use standard chatrooms. I have dug thru the nslog help pages but did not find anything pertinent Thankyou. Sincerely Kerry Admin@MntnWeb.Com WWW server hosting Http://mntnweb.com Binghamton online Webcam Http://MntnWeb.Com/bing.htm CHRISTMAS Web Page Http://mntnweb.com/xmas.htm ========================================================================= Date: Sat, 17 Apr 1999 22:48:43 -0800 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: David Richards Subject: arsdigita's acs and sybase Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi all! I'm new here. Has anyone ported arsdigita's acs to sybase? Does = anyone know of someone who has or has tried? Thanks, Dave David Richards, Assistant Director I.T.S. Ventura County Superintendent of Schools Office 5189 Verdugo Way, Camarillo, Ca 93012 Voice: 805-383-1966 Fax: 805-383-1997 ========================================================================= Date: Tue, 20 Apr 1999 22:50:04 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jim Wilcoxson Subject: updating ns_share vars In-Reply-To: <19990410140605.2702.qmail@waltham2.arsdigita.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Are TCL functions like lreplace atomic for ns_share vars? What about operations like assignment or incr? TIA, Jim _____________________________________________ Jim Wilcoxson, Owner Ruby Lane Fine Art, Antiques and Collectibles 1.888.782.9586 (+1.415.864.4563) http://www.rubylane.com ========================================================================= Date: Tue, 20 Apr 1999 23:14:28 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jim Wilcoxson Subject: Any database wizards that can help with this? Comments: cc: Iko Rein In-Reply-To: <19990410140605.2702.qmail@waltham2.arsdigita.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Config is AOLServer 2.3.2, Solid 2.2, RH Linux 5.0. A while back I sent out a note about a concurrency error we were getting from Solid. We have users that have exclusive access to records in a database, and yet we got concurrency errors. Tracing back through the logs, it made no sense - the transactions on the records weren't even close to each other. I think I understand the problem now, but am not sure what to do about it. AOLServer's DB handle/connection caching are part of the problem: 1. A thread does a select with DB handle 1 and displays some data to a user X. 2. 3 minutes later, a user requests some more data and a select starts using DB handle 1. 3. A thread does a database update for user X. Since DB handle 1 is busy, a new handle is used for the update. 4. All DB operations complete. There are still 2 connections to Solid active though. 5. n minutes later, user X comes back to view his changed record. DB handle 1 is used this time. The changed data isn't visible. A related problem is that instead of viewing the changed data, the user tries to change it (again). This time, the update will fail with a concurrency error because there has never been a commit on this connection, so this connection sees the database as it existed at the time of the first select in step 1. I think the solution for this is to do a commit *before* ns_db gethandle returns an already connected database handle from the connection pool. Anyone have ideas?? Thanks, Jim ========================================================================= Date: Wed, 21 Apr 1999 10:45:53 +0200 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Michael Juergens Organization: Crocodial Communications Subject: ns_register_filter ans FTP-Server MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6F12156BD2A0B1C974CD930D" This is a multi-part message in MIME format. --------------6F12156BD2A0B1C974CD930D Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi, does anybody know, if I can use the ns_register_filter procedure also for FTP-requests? I ´ve written a special accesscontrol for webaccess, but now I see that it will be ignored by ftp. regads, Michael Jürgens Crocodial Communications --------------6F12156BD2A0B1C974CD930D Content-Type: text/x-vcard; charset=us-ascii; name="m.juergens.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Michael Juergens Content-Disposition: attachment; filename="m.juergens.vcf" begin:vcard n:Juergens;Michael tel;fax:+49.40.85326464 tel;work:+49.40.8532640 x-mozilla-html:TRUE url:http://www.crocodial.de org:Crocodial Commuications adr:;;Ruhrstr. 61;Hamburg;;D-22761;Germany version:2.1 email;internet:m.juergens@crocodial.de title:Senior Consultant fn:Michael Juergens end:vcard --------------6F12156BD2A0B1C974CD930D-- ========================================================================= Date: Wed, 21 Apr 1999 11:51:30 +0200 Reply-To: Branimir Dolicki Sender: Web Development with AOLserver From: Branimir Dolicki Subject: Concurrency problem with Solid/Aolserver Comments: cc: Sebastian Skracic , Jim Wilcoxson MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Jim Wilcoxson wrote: > 1. A thread does a select with DB handle 1 and > displays some data to a user X. > > 2. 3 minutes later, a user requests some more data > and a select starts using DB handle 1. > > 3. A thread does a database update for user X. > Since DB handle 1 is busy, a new handle is used > for the update. > > 4. All DB operations complete. There are still > 2 connections to Solid active though. > > 5. n minutes later, user X comes back to view his > changed record. DB handle 1 is used this time. > The changed data isn't visible. Looks like the session with the first handle hasn't commited... Normally the solid driver works in autocommit mode unless you say "AUTOCOMMIT OFF" Do you use "SET AUTOCOMMIT OFF" anywhere in your web scripts? When I say "anywhere", I mean also in scripts that have nothing to do with these two scripts involved in the problem. The problem with this feature (contributed by Sebastian Skracic) is, as you can see from tye BUGS section of the driver source file examples/c/solid/solid.c is that if any script puts the session in non-autocommit mode (i.e. if it starts a transaction block) and forgets to put it back to atocommit mode, other scripts inheriting the connection will stay within the transaction block and will have to commit if they want to see changes done by other scripts. You may say "SET AUTOCOMMIT ON" at the beginning of every script. It doesn't hurt to do so even if the session is already in autocommit mode. HTH, -- Branimir ========================================================================= Date: Wed, 21 Apr 1999 00:44:13 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jim Wilcoxson Subject: Database test case Comments: cc: Iko Rein Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Config is AOLServer 2.3.2, Solid 2.2, RH Linux 5.0. Here's a test case for the concurrency problem I'm seeing... It's a bit contrived, because we see this error spread out over a period of several minutes with separate threads executing the SQL operations. Shouldn't this work?? Jim set dbs [ns_db gethandle rl 2] set db1 [lindex $dbs 0] set db2 [lindex $dbs 1] set rows [ns_db select $db1 "select * from regusers where nickname='bkco'"] ns_db dml $db2 "update regusers set firstname='denny' where nickname='dplesea'" ns_db releasehandle $db2 ns_db flush $db1 ns_db dml $db1 "update regusers set firstname='denny' where nickname='dplesea'" return ========================================================================= Date: Thu, 22 Apr 1999 14:49:03 +0200 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Sebastian Skracic Subject: Solid concurrency problem Comments: cc: Jim Wilcoxson , Branimir Dolicki In-Reply-To: <199904210404.AAA17029@services.web.aol.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII > Date: Tue, 20 Apr 1999 23:14:28 -0400 > From: Jim Wilcoxson > Subject: Any database wizards that can help with this? > > 1. A thread does a select with DB handle 1 and displays some data to a user X. > 2. 3 minutes later, a user requests some more data and a select starts > using DB handle 1. > 3. A thread does a database update for user X. Since DB handle 1 is busy, > a new handle is used for the update. > 4. All DB operations complete. There are still 2 connections to Solid > active though. > 5. n minutes later, user X comes back to view his changed record. DB > handle 1 is used this time. The changed data isn't visible. 1) is page grabbed from browser cache? 2) versioning has its drawbacks, obviously. What I suggest is to COMMIT before attempting to retrieve changed record, although you use default autocommit behaviour (I guess). In SOLID, you should COMMIT frequently, even though you might be running only SELECTs - this helps preventing memory leaks. The above behaviour is exactly similar in InterBase. You have to COMMIT both db handles, and make sure that you issued COMMIT for reader's db handle *AFTER* commiting writer's db handle to be able to see changes made by writer's db handle through reader's db handle. Good luck, Seb. ========================================================================= Date: Thu, 22 Apr 1999 14:44:57 +0200 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Bas Scheffers (datadesign.nl)" Subject: Postgres driver for linux In-Reply-To: <199904220343.FAA26619@s025.widexs.nl> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi list, Has anyone compiled the postgres driver for linux? (RH5.2 and Postgres 6.4.2) If so, would you have the Makefile you used for me? Also: one of the files needed seems to be missing: libpq-fe.h Is this a typo by AOL (I have a libpq-fs and a -be) or do need to get it someplace else? Thanks a lot, Bas Scheffers. ========================================================================= Date: Thu, 22 Apr 1999 13:23:34 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Peter M. Jansson" Subject: Re: Database test case MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Using the Illustra driver, ns_db flush forces a rollback, rather than a commit. I don't know what the Solid driver does. Pete. Jim Wilcoxson wrote: > > Config is AOLServer 2.3.2, Solid 2.2, RH Linux 5.0. > > Here's a test case for the concurrency problem I'm seeing... > It's a bit contrived, because we see this error spread out > over a period of several minutes with separate threads executing > the SQL operations. > > Shouldn't this work?? > > Jim > > set dbs [ns_db gethandle rl 2] > set db1 [lindex $dbs 0] > set db2 [lindex $dbs 1] > > set rows [ns_db select $db1 "select * from regusers where nickname='bkco'"] > > ns_db dml $db2 "update regusers set firstname='denny' where nickname='dplesea'" > ns_db releasehandle $db2 > > ns_db flush $db1 > ns_db dml $db1 "update regusers set firstname='denny' where nickname='dplesea'" > return ========================================================================= Date: Thu, 22 Apr 1999 12:55:15 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeremy O'Day Subject: Directory Listing MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hello, I was wondering what the best way to do a directory listing in a TCL script is from AOLServer is. Using the 'exec' command to pipe and 'ls' into a file that I parse seems a little ugly. I am looking to create a drop-down box that contains a list of files from a specified directory. Does anybody know of a better way to get this directory list? Thanks. Jeremy O'Day Systems Engineer ========================================================================= Date: Thu, 22 Apr 1999 13:07:32 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeff Huber Subject: Re: Directory Listing MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit The best method is to use the Tcl command glob which returns a Tcl list of all files that match a specified pattern. (See: http://www.aolserver.com/server/docs/2.3/html/tclr-c25.htm). You can then foreach through the list and build the html for the drop-down box. Jeremy O'Day wrote: > > Hello, > I was wondering what the best way to do a directory listing in a TCL > script is from AOLServer is. Using the 'exec' command to pipe and 'ls' > into a file that I parse seems a little ugly. I am looking to create a > drop-down box that contains a list of files from a specified directory. > Does anybody know of a better way to get this directory list? Thanks. > > Jeremy O'Day > Systems Engineer -- ---------------------------------------------- | Jeff Huber | Web Applications Developer | | jeff@am.net | AM.net - http://am.net | ---------------------------------------------- ========================================================================= Date: Thu, 22 Apr 1999 15:27:17 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Kerry Barlow Subject: Robots Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Hi all I have asked this before and still am being KILLD by the darn webrobots. Why the DEVIL doesnt the robots.txt file work on AOlserver? it certainly will not work for my system! I certainly cannot write to every single one of the 200 plus webrobots out there and have them manually stop hitting my site. Worse yet I cant even track down where these devils are coming from the hit my system. I had Excite manually shut down because they tottaly ignore the robots.txt file despite there claims to the contrary. I could add in a seperate perm file for every single robot,but this is a stop gap measure at best. I simply cannot believe every single AOLserver out there has to manually create perm files to prevent every darn robot from hitting there site? Any more advice would be appreciated! Sincerely Kerry Admin@MntnWeb.Com WWW server hosting Http://mntnweb.com Binghamton online Webcam Http://MntnWeb.Com/bing.htm CHRISTMAS Web Page Http://mntnweb.com/xmas.htm ========================================================================= Date: Thu, 22 Apr 1999 14:23:32 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeff Huber Subject: Re: Robots and a Robot Trap MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Kerry, The robots.txt exclusion method is completely webserver independent. If robots are ignoring your robots.txt it has nothing to do with the webserver being AOLserver. Are you sure you have your robots.txt setup correctly? As mentioned previously on this list, some robots are just rude and there isn't much you can do about it except block the network they came from. (Which takes a lot of time and is dangerous because you may also block legitimate customers. The latter has happened to me so be careful.) Unless you have a lot of time the best defense against rude robots is probably to get a bigger pipe. You may want to check out The Web Robots Pages at http://info.webcrawler.com/mak/projects/robots/robots.html. They have a lot of good information. Good luck BTW, Michael, the robots trap probably wouldn't work because most robots I have seen stop crawling after a certain depth within a site. All though it would be fun to try. Here's a code snippet that would work: (I couldn't resist) ns_register_proc GET /dieRobots dieRobots proc dieRobots {conn ignore} { ns_share robotTrapNumber if ![info exists robotTrapNumber] { set robotTrapNumber 1 } else { incr robotTrapNumber } ns_return $conn 200 text/html " Robot Trab You haven't gone here yet... $robotTrapNumber " } Just put a discreet link to /dieRobots/something.html on your home page and watch your logs. I'll I need now is a highly-visible site to try this on.... :-) Kerry Barlow wrote: > > Hi all I have asked this before and still am being KILLD by the darn webrobots. > Why the DEVIL doesnt the robots.txt file work on AOlserver? it certainly > will not work for my system! I certainly cannot write to every single one of > the 200 plus webrobots out there and have them manually stop hitting my > site. Worse yet I cant even track down where these devils are coming from > the hit my system. I had Excite manually shut down because they tottaly > ignore the robots.txt file despite there claims to the contrary. > I could add in a seperate perm file for every single robot,but this is a > stop gap measure at best. I simply cannot believe every single AOLserver out > there has to manually create perm files to prevent every darn robot from > hitting there site? > > Any more advice would be appreciated! > Sincerely > Kerry > Admin@MntnWeb.Com > WWW server hosting > Http://mntnweb.com > Binghamton online Webcam Http://MntnWeb.Com/bing.htm > CHRISTMAS Web Page Http://mntnweb.com/xmas.htm -- ---------------------------------------------- | Jeff Huber | Web Applications Developer | | jeff@am.net | AM.net - http://am.net | ---------------------------------------------- ========================================================================= Date: Thu, 22 Apr 1999 21:25:33 EDT Reply-To: TandemGuru@aol.com Sender: Web Development with AOLserver From: TandemGuru@aol.com Subject: Free Voice Chat Utility which allows up to 30 people to talk at same time MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Just thought I would turn you folks on to this, sometimes it is easier to Talk about something and be working on AOLSERVER at the same time. Please feel free to send copies to Friends and Family, we only ask that you use the "Start Web Design Chat" area for AOLSERVER discussions and for personal discussions with Friends and Family use the "Start Communications Chat" area, Thanks Enjoy :-) Please go here to get this utility: http://www.trav-tech.com/chat.html Webmaster@trav-tech.com AKA ( Don Kennedy ) ========================================================================= Date: Fri, 23 Apr 1999 07:17:49 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "Larry W. Virden" Subject: Re: Directory Listing In-Reply-To: Your message of Thu, 22 Apr 1999 12:55:15 -0700 One starting point for locating answers to Tcl questions is , from which you can then find pointers to answers, reference material, tutorials, applications, extensions, etc. -- Larry W. Virden <*> O- "No one is what he seems." Unless explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. ========================================================================= Date: Fri, 23 Apr 1999 12:13:19 EDT Reply-To: WesShull@aol.com Sender: Web Development with AOLserver From: Wes Shull Subject: Has anyone compiled the postgres driver for linux? Comments: To: datade@s025.widexs.nl MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit datade@s025.widexs.nl inquired: << Has anyone compiled the postgres driver for linux? >> The following changes work for me. I think I'm running Redhat 5.2 (that's what I put in the comment back when I did it, anyway %^/ ) # RedHat Linux 5.2 CC=gcc COPTS=-D__unix__ -D__sun4__ -I$(NSHOME)/pthreads/include -I$(NSHOME)/include \ -fpic -Wall -I/usr/include/pgsql LDFLAGS=-shared -lpq --wes ========================================================================= Date: Thu, 22 Apr 1999 21:36:15 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: jim@rubylane.com Subject: Re: Database test case In-Reply-To: <371F5B0C.F101D8F1@clickvision.com> from "Peter M. Jansson" at Apr 22, 99 01:23:34 pm Content-Type: text Thanks Pete. In this test case though, the flush is to cancel the select. There hasn't been an update transaction on db1 to commit or rollback. The problem with solid is that doing a select establishes a "version point", and subsequent operations with that db handle do not see a current state of the database, as near as I can tell. It seems like the program below should work since the driver (I thought) runs in autocommit mode and the updates are obviously not concurrent in the sense of multiple processes. Does this work with Illustra or Oracle? Anyone else have thoughts about this? Thanks, Jim > > Using the Illustra driver, ns_db flush forces a rollback, rather than a commit. I don't know what the Solid driver does. > > Pete. > > Jim Wilcoxson wrote: > > > > Config is AOLServer 2.3.2, Solid 2.2, RH Linux 5.0. > > > > Here's a test case for the concurrency problem I'm seeing... > > It's a bit contrived, because we see this error spread out > > over a period of several minutes with separate threads executing > > the SQL operations. > > > > Shouldn't this work?? > > > > Jim > > > > set dbs [ns_db gethandle rl 2] > > set db1 [lindex $dbs 0] > > set db2 [lindex $dbs 1] > > > > set rows [ns_db select $db1 "select * from regusers where nickname='bkco'"] > > > > ns_db dml $db2 "update regusers set firstname='denny' where nickname='dplesea'" > > ns_db releasehandle $db2 > > > > ns_db flush $db1 > > ns_db dml $db1 "update regusers set firstname='denny' where nickname='dplesea'" > > return > ========================================================================= Date: Thu, 22 Apr 1999 10:53:08 -0400 Reply-To: "peterv@ivcfne.org" Sender: Web Development with AOLserver From: Peter Vessenes Subject: Re: AOLSERVER Digest - 21 Apr 1999 to 22 Apr 1999 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Jeff, I like it, but couldn't one add a significant wait time in the middle of the html? Say a 200 second wait before the HTML page completes. - Peter Vessenes > BTW, Michael, the robots trap probably wouldn't work because most robots > I have seen stop crawling after a certain depth within a site. All > though it would be fun to try. Here's a code snippet that would work: (I > couldn't resist) > > ns_register_proc GET /dieRobots dieRobots > > proc dieRobots {conn ignore} { > ns_share robotTrapNumber > if ![info exists robotTrapNumber] { > set robotTrapNumber 1 > } else { > incr robotTrapNumber > } > > ns_return $conn 200 text/html " > Robot Trab > > You haven't gone here > yet... $robotTrapNumber > > " > } > > Just put a discreet link to /dieRobots/something.html on your home page > and watch your logs. I'll I need now is a highly-visible site to try > this on.... :-) ========================================================================= Date: Fri, 23 Apr 1999 10:04:40 +0200 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver Comments: RFC822 error: MESSAGE-ID field duplicated. Last occurrence was retained. From: Malte Sussdorff Subject: Re: AOLSERVER Digest - 21 Apr 1999 to 22 Apr 1999 In-Reply-To: <199904230341.FAA21951@post.webmailer.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" >Subject: Postgres driver for linux > >Hi list, > >Has anyone compiled the postgres driver for linux? (RH5.2 and Postgres >6.4.2) If so, would you have the Makefile you used for me? Also: one of >the files needed seems to be missing: libpq-fe.h Is this a typo by AOL (I >have a libpq-fs and a -be) or do need to get it someplace else? The Postgres Driver is already compiled in the distribution of AOLServer. Check: $AOLServerHome/bin/postgres.so ========================================================================= Date: Fri, 23 Apr 1999 18:58:54 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Herbert Samuels Organization: Pure Source Subject: Looking for Developers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I'm looking for AOLServer developers for projects in NYC. You don't have to live in or even know where NY is :-) Please respond to hsamuels@puresource.com. ========================================================================= Date: Sat, 24 Apr 1999 02:33:49 +0200 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Marco Coletti Subject: Disabling reverse name resolution for CGI Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" I'm still running the version 2.1 of AOLserver on Windows NT 4. I noticed that, before spawning any CGI process, the web server insists on trying to find the remote client FQDN (that is, it performs a reverse name resolution for the pourpose to assign a value to the environment variable REMOTE_HOST). Unfortunately not all clients have got a FQDN (for example on an intranet this is hardly a requirement); when such clients try to access a CGI URL, the server responds with a very noticeable delay (ranging about 5 seconds, which is the resolver timeout). I wonder whether there is any configuration parameter for disabling reverse name resolution in CGI, but I did find nothing in the documentation. Advice for those running AS on Windows: it seems the Windows resolver fails when the environment variable SystemRoot is missing or wrong; SystemRoot should be set to the system dir path name (i.e. "C:\WINNT"). Since AS itself does not set this variable when spawning a CGI process, CGI programs dealing with the winsock API will most likely fail. An easy and effective workaround is to create a CGI environment in AS configuration and to set explicitly SystemRoot to "C:\WINNT". ---------------------------------------------------------------------- Marco Coletti Network Admin, Webmaster PGP public key: http://keys.pgp.com:11371/pks/lookup?op=get&exact=on&search=0x96A79061 Fingerprint: 9F E5 80 61 F6 9F 05 2D EA 53 6F 2D 82 8B C7 C2 ---------------------------------------------------------------------- ========================================================================= Date: Sat, 24 Apr 1999 21:27:11 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Bakki Kudva Organization: Navaco Subject: Netscape IE4 diff MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I am having the following problem with the way IE4 handles query strings. I have a page built by the pagebuilder script which sets up a link to another proc as follows. Firstname Lastname This works as expected in Netscape but I find that IE4 sends the query string as firstname%20lastname which ofcourse fails with the database query. Has anyone had this experience? I am using Phil's set_variables_after_query routine to get my var. How can I use regexp to replace %20 with 'space' ? I would appreciate any help with this. -Bakki Kudva Navaco ========================================================================= Date: Sat, 24 Apr 1999 20:46:46 -0500 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: "J. Michael Roberts" Subject: Re: Netscape IE4 diff In-Reply-To: <37226F6F.4783579E@navaco.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII It's generally bad practice to include spaces in URLs, and IE4 goes ahead and URL-encodes them. Use ns_urldecode to un-percent them. The flipside is, of course, that if you *do* have intentional percent signs in there, ns_urldecode might do funny things with them. So what you should probably do is to ns_urlencode them in your page builder. That's what I do. Then you know you have the same thing coming back from Netscape and IE browsers. On Sat, 24 Apr 1999, Bakki Kudva wrote: > I am having the following problem with the way IE4 handles query strings. I have a page built by the pagebuilder script which > sets up a link to another proc as follows. > > Firstname Lastname > > This works as expected in Netscape but I find that IE4 sends the query string as firstname%20lastname which ofcourse fails with > the database query. Has anyone had this experience? I am using Phil's set_variables_after_query routine to get my var. How can > I use regexp to replace %20 with 'space' ? I would appreciate any help with this. > > -Bakki Kudva > Navaco > ========================================================================= Date: Sun, 25 Apr 1999 15:11:48 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: mike chan Subject: Update from Search Results In-Reply-To: <199904240403.AAA18507@services.web.aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" does anyone know why sometimes one can select sybase rows to update from a search screen, but sometimes, the links don't even show up? does it have something to do with keeping an index in that table? and what would be the easiest way to make each row show up in every table? mike chan Crump Institute for Biological Imaging 310.267.9289 - home 310.206.6556 - work Snotty e/c ========================================================================= Date: Sun, 25 Apr 1999 12:14:39 -0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Mark Dalrymple Subject: Re: Netscape IE4 diff In-Reply-To: <199904250408.AAA26322@services.web.aol.com> (message from Automatic digest processor on Sun, 25 Apr 1999 00:04:28 -0400) > sets up a link to another proc as follows. > Firstname Lastname > .. > I am using Phil's set_variables_after_query routine to get my var you'll want to use 'set_form_variables' from Philip's collection. set_variables_after_query only applies when you're snarfing stuff out of a database. ++Mark Dalrymple, ArsDigita. markd@arsdigita.com "Give a hoot - don't dilite!" -- Woodsy, the AntiBronner ========================================================================= Date: Sun, 25 Apr 1999 10:52:28 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: jim@rubylane.com Subject: Re: Disabling reverse name resolution for CGI In-Reply-To: <3.0.3.32.19990424023349.0093a950@mail.eurofin.it> from "Marco Coletti" at Apr 24, 99 02:33:49 am Content-Type: text There is a parameter to stop that in later versions, but it doesn't seem to be in 2.1. You can use DNSCache=on in [ns/parameters] if it isn't already enabled. That may help. You could also hack together a fake name server that returned the IP address as the FQDN without doing a real lookup. Jim > > I'm still running the version 2.1 of AOLserver on Windows NT 4. > > I noticed that, before spawning any CGI process, the web server insists on > trying to find the remote client FQDN (that is, it performs a reverse name > resolution for the pourpose to assign a value to the environment variable > REMOTE_HOST). > Unfortunately not all clients have got a FQDN (for example on an intranet > this is hardly a requirement); when such clients try to access a CGI URL, > the server responds with a very noticeable delay (ranging about 5 seconds, > which is the resolver timeout). > I wonder whether there is any configuration parameter for disabling reverse > name resolution in CGI, but I did find nothing in the documentation. ... > ---------------------------------------------------------------------- > Marco Coletti > Network Admin, Webmaster > > PGP public key: > http://keys.pgp.com:11371/pks/lookup?op=get&exact=on&search=0x96A79061 > Fingerprint: 9F E5 80 61 F6 9F 05 2D EA 53 6F 2D 82 8B C7 C2 > ---------------------------------------------------------------------- > ========================================================================= Date: Sun, 25 Apr 1999 14:49:56 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Bakki Kudva Organization: Navaco Subject: Re: AOLSERVER Digest - 23 Apr 1999 to 24 Apr 1999 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit > Hi Michael, I tried the ns_urldecode function but didn't seem to work for me. Here's the code snippet. set agent [ns_conn query $conn] ns_log Error $agent ns_urldecode $agent ns_log Error $agent set sql "select * from Agents where Name='$agent'" In the above code I still get firstname%20lastname for both ns_log statements. In this case as I always expect the firstname lastname combination from the database I'd be safe in using ns_urldecode here rather than in pagebuilder... but why isn't it working? bakki kudva > Date: Sat, 24 Apr 1999 20:46:46 -0500 > From: "J. Michael Roberts" > Subject: Re: Netscape IE4 diff > > It's generally bad practice to include spaces in URLs, and IE4 goes ahead > and URL-encodes them. Use ns_urldecode to un-percent them. The flipside > is, of course, that if you *do* have intentional percent signs in there, > ns_urldecode might do funny things with them. So what you should probably > do is to ns_urlencode them in your page builder. That's what I do. Then > you know you have the same thing coming back from Netscape and IE > browsers. ========================================================================= Date: Sun, 25 Apr 1999 16:36:08 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeff Huber Subject: Re: AOLSERVER Digest - 23 Apr 1999 to 24 Apr 1999 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Bakki, ns_urldecode returns the value of $agent decoded; it doesn't modify the agent variable. You should replace the line: ns_urldecode $agent with set agent [ns_urldecode $agent] Bakki Kudva wrote: > > > > > Hi Michael, > > I tried the ns_urldecode function but didn't seem to work for me. Here's the code snippet. > > set agent [ns_conn query $conn] > ns_log Error $agent > ns_urldecode $agent > ns_log Error $agent > set sql "select * from Agents where Name='$agent'" > > In the above code I still get firstname%20lastname for both ns_log statements. In this case as I always expect the firstname lastname > combination from the database I'd be safe in using ns_urldecode here rather than in pagebuilder... but why isn't it working? > > bakki kudva > > > Date: Sat, 24 Apr 1999 20:46:46 -0500 > > From: "J. Michael Roberts" > > Subject: Re: Netscape IE4 diff > > > > It's generally bad practice to include spaces in URLs, and IE4 goes ahead > > and URL-encodes them. Use ns_urldecode to un-percent them. The flipside > > is, of course, that if you *do* have intentional percent signs in there, > > ns_urldecode might do funny things with them. So what you should probably > > do is to ns_urlencode them in your page builder. That's what I do. Then > > you know you have the same thing coming back from Netscape and IE > > browsers. -- ---------------------------------------------- | Jeff Huber | Web Applications Developer | | jeff@am.net | AM.net - http://am.net | ---------------------------------------------- ========================================================================= Date: Sun, 25 Apr 1999 17:52:06 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeff Huber Subject: Re: Update from Search Results MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mike, It has nothing to do with an index. Probably the reason the update row link to not showing up is because there is no Primary Key for your table. I see this mistake made often. Everyone is use to Illustra where the link is always there because all Illustra tables have the unique oid (yuck!) column. Also check that 'Enable link to update form from search results' is set to 'On' for your table under Customize Table in /NS/Db/Admin. mike chan wrote: > > does anyone know why sometimes one can select sybase rows to update from a search screen, but sometimes, the links don't even show up? does it have something to do with keeping an index in that table? and what would be the easiest way to make each row show up in every table? > > mike chan > Crump Institute for Biological Imaging > 310.267.9289 - home > 310.206.6556 - work > Snotty e/c -- ---------------------------------------------- | Jeff Huber | Web Applications Developer | | jeff@am.net | AM.net - http://am.net | ---------------------------------------------- ========================================================================= Date: Mon, 26 Apr 1999 11:40:38 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Dominik Kacprzak Organization: Silicon Graphics, Inc. Subject: using ns_httpget through firewall MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, How can I use ns_httpget Tcl call to obtain information from outside of the firewall? I can use ns_httpget on web pages inside the firewall, but I have no idea how to specify proxy information in ns_httpget and ns_httpopen calls. thanks, - Dominik ========================================================================= Date: Mon, 26 Apr 1999 14:06:22 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeff Huber Subject: Odd behavior in ns_sock* commands under NT AS 2.1 Comments: cc: programmers@am.net MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit I've discovered some odd behavior with the ns_sock* commands under NT AOLserver 2.1. I've verified this on several machines. Here's my notes: ns_sockopen: When ns_sockopen is called with a timeout parameter, no matter what the value is, ns_sockopen throws a Tcl error. An interesting note is that the original implementors of ns_sendmail probably knew about this since ns_sockopen in that code doesn't contain a timeout parameter. (Although the ns_sockopen in ns_httpget does and must be removed if you want to use ns_httpget.) ns_sockselect: The ns_sockselect command works inconsistently. The following generated a Tcl error with certain data under NT AS 2.1 but not under Linux AS 2.3.3: called ns_sockselect to check that a socket is readable; read a line from the socket using gets; calling ns_sockselect again to check that the socket is readable. The second ns_sockselect threw the Tcl error: "select failed: no reason". We know there is still data waiting to be read after the gets so we don't need to call the second ns_sockselect. Nevertheless it still shouldn't throw a Tcl error. -- ---------------------------------------------- | Jeff Huber | Web Applications Developer | | jeff@am.net | AM.net - http://am.net | ---------------------------------------------- ========================================================================= Date: Mon, 26 Apr 1999 14:39:11 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Jeff Huber Subject: Re: Tcl proc to fetch POP3 messages Comments: cc: nrosner@slack.net MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------1D574DE405E4B035C33BABB0" This is a multi-part message in MIME format. --------------1D574DE405E4B035C33BABB0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Nicolas, I'm a little behind on my workload (your code was posted almost two years ago). I wanted to let you know that we've been using your pop3 client in a production environment for a while now with very little problems. The minor modiifcations we made were so that we could delete messages, centralize the setting of the timeout, and combine the read of a message into one procedure so we would only perform one ns_sockselect. I've attached our code. (I think I read for one of their services ArsDigita was going to write some pop3 code or already had. A C version would sure be nice and it would be fairly trival to develop.) Nicolas Rosner wrote: > > Hello all, > > I am new to this list. I don't run AOLServer on my own boxes, but I'm a > PrimeHost customer, so I've been trying to learn some Tcl, and I've also > played around a bit with the AOLServer Tcl API. > > I recently wanted to experiment with the ns_sock* procedures, so I built > this small script which basically should act as a bare-bones POP3 client. > If you want to take a look at the code, I've put it up at: > > http://www.vallegrande.com/rosman/testpop.tcl.txt > > The 'testpop' procedure should be called with three arguments: the name of > a host (on which of course a POP3 server must be running on port 110), the > name of a valid user ID on that server, and the password. > > It should return a null string if there are no messages in the mailbox, or > a list of messages if there are any. Each one of the list elements is a > list with four elements: the From field, the Date field, the Subject field > and finally the message body. > > My little script is still under development, so lots of things are to be > done, and I'm just an amateur programmer, so I wanted some friendly advice > :) > > Would it be safe to ns_schedule this script so it'll be run once every xx > minutes, or do you see any nasty, potential server-crashing errors? If I > could let it run automatically, it could be very useful for my purposes -- > for instance, I could put up an automatically generated page on my site > which would update itself based on incoming mail.. etc. > > Of course, in that case, a "DELE" POP3 command should be added to the > procedure so the same messages wouldn't be fed in over and over again. > > (But maybe I'm reinventing the wheel here, and there are finished products > that achieve the same result more, er, "professionally"...) > > Any comments will be greatly appreciated. > > Regards, > Nicolas -- ---------------------------------------------- | Jeff Huber | Web Applications Developer | | jeff@am.net | AM.net - http://am.net | ---------------------------------------------- --------------1D574DE405E4B035C33BABB0 Content-Type: application/x-tcl; name="pop3.tcl" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pop3.tcl" # # The original code was posted on the AOLserver mailing list by nrosner@slack.net # 1997-07-25. # # We renamed it from testpop to pop3, added support to delete messages, combined # the read of a messsage into one procedure so we would perfrom one ns_sockselect # to work around the ns_sockselect bug, and centeralized the setting of the timeout # variable. # # This procedure takes four arguments: # # - the name of a host where a POP3 daemon is running # - the name of a valid user mailbox on that system # - the password for that particular user # - an optional paramater which if not blank deletes all messages proc pop3 {theHost theUser thePass {deletemsgs {}}} { set timeout 100 set thePort 110 set theSocket [ns_sockopen $theHost $thePort] set rid [lindex $theSocket 0] set wid [lindex $theSocket 1] set err [catch { _pop3_waitforok $rid $timeout _pop3_write $wid "USER $theUser" $timeout _pop3_waitforok $rid $timeout _pop3_write $wid "PASS $thePass" $timeout _pop3_waitforok $rid $timeout _pop3_write $wid "STAT" $timeout set theStat [_pop3_read_line $rid $timeout] set howManyMsgs [lindex [split $theStat " "] 1] set theMsgs "" if {$howManyMsgs > 0} { for {set i 1} {$i <= $howManyMsgs} {incr i} { _pop3_write $wid "RETR $i" $timeout set aMsg [_pop3_read_msg $rid $timeout] set theProcessedMsg [_pop3_process_msg $aMsg] lappend theMsgs $theProcessedMsg if {$deletemsgs != ""} { _pop3_write $wid "DELE $i" $timeout _pop3_read_line $rid $timeout } } } _pop3_write $wid "QUIT" $timeout _pop3_waitforok $rid $timeout } errMsg] close $rid close $wid if $err {return -code error $errMsg} return $theMsgs } proc _pop3_write {wid theString theTimeOut} { set sel [ns_sockselect -timeout $theTimeOut {} $wid {}] if {[lindex $sel 1] == ""} { error "Timeout while trying to send '$theString' to POP3 host" } puts $wid "$theString\r" flush $wid } proc _pop3_waitforok {rid theTimeOut} { set sel [ns_sockselect -timeout $theTimeOut $rid {} {}] if {[lindex $sel 0] == ""} { error "Timeout while waiting for +OK from POP3 host" } set theLine [gets $rid] set theOK [string range $theLine 0 2] if ![string match "+OK" $theOK] { error "Expected +OK from POP3 host, but got this:\n$theLine" } } proc _pop3_read_line {rid theTimeOut} { set sel [ns_sockselect -timeout $theTimeOut $rid {} {}] if {[lindex $sel 0] == ""} { error "Timeout while trying to read a single line from POP3 host" } set aLine [gets $rid] return $aLine } proc _pop3_read_msg {rid theTimeOut} { set sel [ns_sockselect -timeout $theTimeOut $rid {} {}] if {[lindex $sel 0] == ""} { error "Timeout while trying to read a single line from POP3 host" } set aLine [gets $rid] set howManyBytes [lindex [split $aLine " "] 1] set theMsg [read $rid $howManyBytes] if {[string index [set TheDot [gets $rid]] 0] !="." } { gets $rid } return $theMsg } proc _pop3_process_msg {theMessage} { set to [_get_until_newline $theMessage \ [expr [string first "To: " $theMessage] + 4]] set from [_get_until_newline $theMessage \ [expr [string first "From: " $theMessage] + 6]] set date [_get_until_newline $theMessage \ [expr [string first "Date: " $theMessage] + 6]] set subject [_get_until_newline $theMessage \ [expr [string first "Subject: " $theMessage] + 9]] set bodyStart [string first "\n\r\n" $theMessage] set body [string trim [string range $theMessage $bodyStart end]] return [list $to $from $date $subject $body] } proc _get_until_newline {theText startPos} { set theRest [string range $theText $startPos end] set newLinePos [string first \n $theRest] set endPos [expr $newLinePos + [string length $theText] - [string length $theRest]] return [string trim [string range $theText $startPos $endPos]] } --------------1D574DE405E4B035C33BABB0-- ========================================================================= Date: Tue, 27 Apr 1999 09:20:30 +0200 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Michael Juergens Organization: Crocodial Communications Subject: Re: using ns_httpget through firewall MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------6B81B6F03E512B093A4DF43B" This is a multi-part message in MIME format. --------------6B81B6F03E512B093A4DF43B Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi Dominik, maybe you want to go to http://www.crocodial.de over your proxy get URL: http://proxy:port/http://www.crocodial.de Regards, Michael Jürgens Dominik Kacprzak wrote: > Hi, > > How can I use ns_httpget Tcl call to obtain information from outside of > the firewall? I can use ns_httpget on web pages inside the firewall, but > I have no idea how to specify proxy information in ns_httpget and > ns_httpopen calls. > > thanks, > > - Dominik -- Michael Jürgens _____________________________ Crocodial Communications GmbH Senior Consultant Ruhrstr. 61 22761 Hamburg Tel: +49 40 85 32 63 77 Fax: +49 40 85 32 63 64 mailto:m.juergens@crocodial.de http://www.crocodial.de >>>>> --------------6B81B6F03E512B093A4DF43B Content-Type: text/x-vcard; charset=us-ascii; name="m.juergens.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Michael Juergens Content-Disposition: attachment; filename="m.juergens.vcf" begin:vcard n:Juergens;Michael tel;fax:+49.40.85326464 tel;work:+49.40.8532640 x-mozilla-html:TRUE url:http://www.crocodial.de org:Crocodial Commuications adr:;;Ruhrstr. 61;Hamburg;;D-22761;Germany version:2.1 email;internet:m.juergens@crocodial.de title:Senior Consultant fn:Michael Juergens end:vcard --------------6B81B6F03E512B093A4DF43B-- ========================================================================= Date: Thu, 29 Apr 1999 09:32:04 -0700 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Rob Schoening Subject: Connect string for sybase? MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi- Can anyone tell me what the correct format for the Sybase connect string is for AOLServer? I've looked through the documentation, but haven't found anything. Thanks, Rob ========================================================================= Date: Fri, 30 Apr 1999 07:03:42 +0000 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Dominik Kacprzak Organization: Silicon Graphics, Inc. Subject: sharing common variables between threads MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I wanted to write a tcl script which will use threads to grab data from multiple pages. But I have discovered that I cannot access the same global variable when using ns_thread. The example of using ns_thread from AOL docs doesn't work unless I set SharedGlobals=On in ini file. But when SharedGlobals is on, all the script instantiations share global variables. Am I missing something, or there is no way to share variables between threads. thanks, - Dominik ========================================================================= Date: Fri, 30 Apr 1999 07:57:17 -0400 Reply-To: Web Development with AOLserver Sender: Web Development with AOLserver From: Kimsey Pollard Subject: Re: AOLSERVER Digest - 27 Apr 1999 to 29 Apr 1999 In-Reply-To: <199904300404.AAA16489@services.web.aol.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" (AOL Server and sybase on the same machine) step 1. compiling and starting nssybpd for sybase (my makefile for sybase EAS on SUSE, the SYB_LIBS line has been modified from the original for use with EAS ): # EDIT: Location of the AOLserver files (normally the ~nsadmin directory): NSHOME=/opt/aol # EDIT: Location of the Sybase files: SYBASE=/opt/sybase # UNCOMMENT: Additional libraries for Solaris: # SYB_SPEC=-ltli -lsocket -lnsl # UNCOMMENT: Additional libraries for Red Hat Linux 5.1 #SYB_SPEC=-lnsl -linsck # You should not need to edit anything below this line. PD=nssybpd OBJS=nssybpd.o CFLAGS=-g -I$(NSHOME)/include -I$(SYBASE)/include -Daxposf=1 SYB_LIBS=-L$(SYBASE)/lib -lct -lcs -lcomn -lintl -linsck -ltcl $(SYB_SPEC) all: $(PD) $(PD): $(OBJS) $(CC) -o $(PD) $(OBJS) $(NSHOME)/lib/libnspd.a $(SYB_LIBS) install: $(PD) cp $(PD) $(NSHOME)/bin/ clean: rm -f *.o $(PD) Step 2. (these are the db entries in my nsd.ini file): [ns/db/driver/extsyb] LocalDaemon=nssybpd Param=/opt/sybase [ns/db/drivers] extill=nsext.so extsyb=nsext.so [ns/db/pool/zeus] Driver=extsyb Connections=2 DataSource=SYBASE:pubs2 User= "a user name in sybase which has the desired priviledges" Password="password for this sybase user" Verbose=Off LogSQLErrors=Off ExtendedTableInfo=On [ns/db/pools] zeus=zeus The AOL-Sybase combo works well but the documentation to marry them is thin despite the fact that I understand that AOL uses Sybase for it's sites. Kimsey At 12:01 AM 4/30/99 -0400, you wrote: >There is one message totalling 17 lines in this issue. > >Topics of the day: > > 1. Connect string for sybase? > >---------------------------------------------------------------------- > >Date: Thu, 29 Apr 1999 09:32:04 -0700 >From: Rob Schoening >Subject: Connect string for sybase? > >Hi- > > Can anyone tell me what the correct format for the Sybase connect string >is for AOLServer? I've looked through the documentation, but haven't found >anything. > > >Thanks, > >Rob > >------------------------------ > >End of AOLSERVER Digest - 27 Apr 1999 to 29 Apr 1999 >**************************************************** > kimsey.pollard@mirc.gatech.edu Georgia Institute of Technology 791 Atlantic Drive, Atlanta, Georgia 30332 (404) 894-4207