Forum OpenACS Development: ns_charset

Posted by Dan Wickstrom on
I noticed that installing from HEAD gives a bunch of errors due to ns_charset not being defined when using aolserver 3.5.1.  Has anybody created a patch to add ns_charset and the  other i18n stuff from 3.3+ad13 to 3.5.1?  Does 4.0 have this stuff?
2: Re: ns_charset (response to 1)
Posted by Jamie Rasmussen on
AOLserver 4.0 beta 2 has ns_charsets, ns_encodingforcharset, and ns_startcontent, 3 AD13 C API funcs needed for OpenACS.  It is missing the charsets.tcl file from 3.3+AD13 and a few matching changes to init.tcl and http.tcl.  The ACT's Mark Page has got adding these on his To Do list.  I'm pretty sure you could just drop those files from 3.3+AD13 into 4b2 and it would work - i.e. I'm not using i18n, but I've installed the OpenACS HEAD that way.  Jeff Davis said that OpenACS 4.6 will install on AOLserver 4 without those Tcl procs.

I made some patches for 3.5.1 starting from work done by Pierre Asselin for 3.4.2.  You can find the results at  I'm not actually using those sources and would recommend going with 4.0 instead.

I posted a list of remaining AD13 vs 4.0 issues to the AOLserver mailing list the other day and got a few responses from OpenACS'ers.  In addition to the above:

1.  The ns_uuencode patch #474259.  I should submit an updated diff. OpenACS falls back to a Tcl proc if this patch isn't there.  The AD13+OACS implementation is broken.
2.  AD13 has byte range request support (a HTTP/1.1 feature).  There was a concern that, if added, this feature should be made configurable to prevent abuse by download accelerators.
3.  Small additions/bugfixes in AD13.  I'm not sure which of these are needed: ns_db stats, WarnEmpty parameter for database pools, SIGSEGV fix for Linux, 401 redirect in nsd.tcl fix, etc.
4.  Don reports that you can't virtual host two OpenACS 4.x sites currently because nscache maintains one giant global cache for everyone, so the two instances clash over their "util_memoize" cache.

3: Re: ns_charset (response to 1)
Posted by Don Baccus on
The last can be worked around in our sources if necessary (by uniquely naming the cache) but I'd rather learn what it takes to fix ns_cache and do it there.

In a sense we haven't lost anything because you couldn't virtual host at all in AOLserver 3 without resort to solutions such as that made available by Jerry Asher, solutions that I assume still work?

4: cacheing compiled bytecode (response to 1)
Posted by Andrew Piskorski on
There's also the cacheing of the compiled bytecode of *.tcl pages beneath the www/ pageroot using ns_cache, which Rob Mayoff implemented in aolserver/tcl/file.tcl and aolserver/tcl/tclcache.tcl in 3.3+ad13. That's not in 4.0 yet either.

However, that's a performance issue only, everything will work without it, and it would probably only be important for high volume sites. (So far, no one as really characterized the performance difference.)

Posted by Jamie Rasmussen on
One other thing I forgot to mention - nsopenssl doesn't work with 4.0 yet, as Scott is making some substantial changes to it.  Mark is working on a upgrade doc for module authors that is supposed to be released some time early next week.  Beta 3 of the core might come at the end of next week, and there will probably be an effort to get documentation and non-core modules updated after that.