Forum OpenACS Q&A: Response to Win2k Installation

Collapse
Posted by Jamie Rasmussen on
Here I am! Feel free to email me as well, or drop by the AOLserver chat later today and every Thursday.

There are a couple of problems with file uploads. Some are in AOLserver, some are in OpenACS. It sounds like you may have fixed some of the ones in AOLserver yourself. I'm really working exclusively with AOLserver 4 now, but most of these problems are also in 3.x I believe.

  1. AOLserver's NsTclTmpNamCmd C function (implements ns_tmpnam) uses the tmpnam function when it should really be using GetTempFileName and other Win32 API funcs.
  2. nspostgres is missing O_BINARY flags in the open() function calls.
  3. Ns_ConnGetQuery is broken. I think it had to do with spaces in filenames. Another function had to be modified as well.
  4. In OpenACS, look at ad_page_contract_filter tmpfile and check_for_form_variable_naughtiness. These functions validate that the temporary directory used is "/var/tmp" or "/tmp", which, of course, is not the temporary directory on Windows. I think that is the primary cause of the error you are getting.
I've patched all of the AOLserver file upload bugs I know of in the 4b1 version that I'm distributing at http://empoweringminds.mle.ie/openacs/installer/. I'd be happy to compare patches with you. (The source is there too, but it is from 4...) I haven't used the ecommerce module myself, so you might be running into a problem I'm unfamiliar with. I haven't been able to compile nsopenssl with AOLserver 4 but unless I'm gravely mistaken, it is a cross-platform problem. I've been talking with Scott G. who maintains it. He's very busy but also extremely friendly. He often drops in on the AOLserver chats. I know nsopenssl *used* to compile on Windows, but I don't know if it still does or if there are binaries available somewhere.

I've been really busy lately so I haven't had time to properly document all of these problems on this bboard. For the OpenACS temp dir problem (and there are a few other minor Win32 problems I'm aware of) I'll be submitting patches as soon as I find the time to clean and document them. (Done in time for OpenACS 4.7, I hope.)