Forum OpenACS Development: Re: File Upload Fails on Windows OACS Installaion

Collapse
Posted by Gustaf Neumann on

wrong # args: should be "ns_mktemp ?template?"

This indicates, that you are not using NaviServer 5. What version of NaviServer and Tcl are you using?

With NaviServer 5, we see:

%      set template [ns_config ns/parameters tmpdir]/nsd-XXXXXX 
/var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-XXXXXX
%       set tmpFileName [ns_mktemp $template]
[05/Nov/2025:17:16:15][26758.16f81b000][-command-] Deprecated: 'ns_mktemp /var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-XXXXXX' is deprecated since it poses a potential race condition and security risk; consider using 'ns_uuid' or 'file tempfile' instead
/var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-mcxy0v
% 
% 
% set tmpFileName [ns_mktemp -nocomplain $template]
/var/folders/w3/w_b0s6rj11n5q1fnrpxwl07m0000gn/T/nsd-WzF5Xh
...

From your post, it is not clear to me, if your setup is now working, or if you need more help.

I am currently on a boat on the Mekong in Cambodia, i might not be able to respond for a couple of days.

Collapse
Posted by Raul Rodriguez on
Hi,
Per our windows installation:
https://openacs.org/xowiki/openacs-system-install-windows-server
 • This is Version 5.16.0 (4th of September 2023) of Windows-OpenACS port and it consists of:
naviserver-5.0.0 – including
   • nsdbpg 2.8
   • nsoracle 2.9
   • nsssl 2.3
 • tcl-8.6.13
 • tk-8.6.13
 • tDOM-0.9.1
 • xotcl-2.3.0 (nsf 2.3.0)
 • libthread-2.8.8
 • tcllib-1.20
 • zlib-1.3
 • postgresql-16.4
 • openssl-3.1.3
 • OpenACS 5.10.1
 • External binaries:
a. Strawberry Perl 5.32.1.1 including MinGW 64 binaries (http://strawberryperl.com/)
b. Curl 7.47.0 (http://curl.haxx.se/)
c. brotli v1.0.7 (https://github.com/google/brotli)

Our version of Naviserver is 5.0.0 and Tcl version: 8.6.13.

Our ad_file fails on:

    if {![ad_file owned $tmpfile]} {
        #
        # File does not belong to us: not safe
        #
    ns_log Notice ">>> UPLOADCHECK file owned False"
       # return false
    }

When we ignore this check the file does upload. Since, this looks like another issue specific to TCL with a windows installation, we are working on creating another test server with linux.

Thank you