Repo link on SF Summary page pointing to obsolet Bitbucket repository
Thanks a lot for reporting. The link is now pointing correctly to GitHub
There is now (since Nov 6) a change following your request in the repository: https://github.com/naviserver-project/naviserver/commit/48c541c3ac647c1f45462d3c9dd90fbfbd7f1b48 Note, that this is not the usual source location (there is currently a problem on bitbucket with their changes in the licensing model). Furthermore, this change is in the main branch, whereas your diff above is from the release/4.99 branch. There are substantial changes in the main branch (to be used in the release 5.0 of NaviServer)...
contrary to documentation "name" option to [ns_set create] is not optional.
UTF8 input not validated
There was a large reform for handling UTF-8 in NaviServer - and in Tcl as well. Full support for UTF-8 from Tcl will be introduced by the forthcoming Tcl9. NaviServer performs peroper conversions where ever necessary (e.g. in the DB drivers). Furthermore, there is a validation support in NaviServer on the Tcl level "ns_valid_utf8" and on the C API level "Ns_Valid_UTF8()".
contrary to documentation "name" option to [ns_set create] is not optional.
Many thanks for the report. This has been fixed apparently some time ago.
Is there an application that needs this variable? According to https://www.php.net/manual/en/reserved.variables.server.php scripts executed with the CLI (such as file.php or ../file.php), SCRIPT_FILENAME will contain the relative path specified by the user, otherwise the absolute pathname (not the requested file name, but the path on the file system). Is this also your expectation?
ns_accesslog extendedheaders
Hi Khy, Thanks for the report, this is fixed by https://bitbucket.org/naviserver/naviserver/commits/b50875f5dea00dc1c7c00ceed77e1fbacb7a6c1f Setting the extendedheaders via configuration file was ok, we use e.g. ns_section ns/server/${server}/module/nslog { ... ns_param extendedheaders "Host X-User-Id X-Mobile_p" ... } all the best -g
nsf does not work with Tcl/Tk 8.7.a5
Hi Paul, many thanks for the good report! This issues is fixed already in the tip version since May https://cvs.openacs.org/changelog/nsf?cs=e01e30551cfcc79872de5b8a08a31258e3414c97 the fixed release is ante portas All the best -g
Provide access to default configuration
The magic of config values was addressed in 3 ways: a) the config operations can be traced via "ns_logctl severity dev on" b) whenever a config option is read the values have been made visible through introspection c) all values can be inspected via the nstats module (nsstats?@page=configparams)
Timeout in DriverRecv?
The code has been rewritten several time since the bug report. All of Driver-IO is non-blocking. The receive operation performs the timeout wait operation only, when a timeout is provided.
Virtual Hosts
'ns_schedule_proc -once 0 foo' now fails but should work
fixed in git
we have fixed this already locally.... will push this to git as soon as possible
ns_sourceproc does not work as intended (from tcl/file.tcl)
Your are right. I removed one inconsistency about enabletclpages about one year ago [1], so ns_sourceproc could be used in plain NaviServer until then. Yes, in OpenACS the request processor takes over, using its own abstractions and mapping to physical files. [1] https://bitbucket.org/naviserver/naviserver/commits/3d68beae91e629c72b283ce181cbf36d1f973421
invalid request 400 (Bad Request)
By default, "enabletclpages" registers tcl procs via ns_register_tcl $method /*.tcl and not via ns_register_proc $method /*.tcl ns_sourceproc, what you seem to use. From my understanding ns_sourceproc is outdated..... may i ask, why you use this? When ns_sourceproc is used, you are right, i can confirm that there is/was an error. I have fixed that along the lines you are mentioning in the bitbucket repository.
This message means, that the server has received a request on a plain TCP connection (via driver nssock), which does not look like a valid HTTP request, but like an attempt to connect to the TCP port via TLS (a https://... request instead of a http://... request) . While the driver "nssock" is for plain HTTP connections, the counterpart for HTTPS is nsssl. See [1] for a short description of nsssl. The NaviServer repository on bitbucket contains a larger configuration example for OpenACS. -gn PS:...
invalid command name "dir"
ns_share is deprecated
You seem to port some legacy software! Here is an example, which resembles pretty much your case: https://openacs.org/forums/message-view?message_id=4263411
uploaded file tmp
undefined symbol: _Ns_DbDriverInit when including PostgreSQL driver
In NaviServer there is no /usr/local/ns/lib/tdbc... directory. There is a tdbc package from Kevin Kenny, but have not use this, and i cannot comment on this. Remove the directory and NaviServer will probably start fine
I have added the missing symbol to nsmemcached (available via https://bitbucket.org/naviserver/nsmemcache/)
when using naviserver-4.99.17, one should use the modules from naviserver-4.99.17-modules.tar.gz, which includes nsdbi and nsdbipg in version 0.3. As a reference, below is a sample config file and sample query, If this still does not work, please report OS version and compiler. Do you need nsdbmysql and nsmemcache? AFIKT, both of these modules are not widely in use. -gn Config file simple-config.tcl : ns_section "ns/servers" ns_param default NaviServer ns_section "ns/server/default/adp" ns_param...
when using naviserver-4.99.17, one should use the modules from naviserver-4.99.17-modules.tar.gz, which includes nsdbi and nsdbipg in verison 0.3. As a reference, below is a sample config file and sample query, If this still does not work, please report OS version and compiler. Do you need nsdbmysql and nsmemcache? AFIKT, both of these modules are not widely in use. -gn Config file simple-config.tcl : ns_section "ns/servers" ns_param default NaviServer ns_section "ns/server/default/adp" ns_param...
What exact version of NaviServer, nsdbi and nsdbipg are you using? One should always use matching versions from the version numbered subdriectories (or tip, when development versions are needed). Note as well that there are two families of db drivers, both containing a PostgreSQL driver: - nsdb (pg driver: nsdbpg), and - nsdbi (pg driver: nsdbipg). Both driver families consist of a generic part and a db specific part.
For the duration of a single request, the file should be there, but then it should be automatically deleted. Naviserver cleans uploaded files. In general, uploading is controlled by many factors (e.g. size, spooling threads), so a small change in a config file can change what happens in detail with the uploaded file. how it is decoded etc. You should modify the file either in the upload requests or move the file to a different place, if it is needed for other requests-
acs_mail_lite::send uses tcllib (addon package for Tcl), which supports StartTLS, but requires the Tcl package "tls" for this, part of tcltls [1], one more addon package for Tcl). It looks to me, as if Maurizio's NaviServer port [2] does not contain tcltls. The NaviServer ns_sendmail [3] command supports StartTLS navtively since 2016 [4], but this is not integrated with acs_mail_lite::send. [1] https://core.tcl.tk/tcltls/index [2] https://www.spazioit.com/pages_en/sol_inf_en/windows-openacs_en/ [3]...
custom adp extensions returning 200 text/plain
Great!
The problem you are experiencing is probably due to the fact that you are using source to load Tcl functions into the current connection thread, but not into the other connection threads waiting for something to do. By hitting a few times reload, you get a different connection thread without these procs, and Tcl complains. You should get familiar with pre-loaded procs (see https://naviserver.sourceforge.io/n/manual/files/tcl-libraries.html). At startup time, NaviServer collects the procs from the...
i asked, since there are several map configuration options for NaviServer. The map at the "adp" section of the config file is finally interpreted as a ns_register_adp command (registered for the HTTP methods GET, HEAD, and POST). I tried to reconstruct, what the problem might be when adding a mapping for /*.ix to the sample nsd-config file . When the following snipped is saved under t.adpor t.ix, the behavior is the same for both requests. <% ns_log notice "this is [ns_url2file [ns_conn url]]"; set...
in which section of the config file have you added this parameter? what is it that you want to achieve?
naviserver - FreeBSD ns_getformfile
Concerning different behavior in spooled and non-spooled cases: In case, huge files (e.g >1GB) are uploaded, NaviServer avoids loading these into memory to keep the memory footprint small and puts this into files. So, the solution is not to use the raw ns_conn form interface, but use instead ns_getform, such as in ns_set get [ns_getform] file This should hide these differences. Concernig registering/unregistering commands: what you sketched will no work reliably no multiple concurrent requests. As...
Some stylistic comments: - don't register procs per request, but put them either into a Tcl file loaded at start time, or via ns_atstartup (e.g. in the config file). The ns_register command is global for the server, not per request. - you can specify the actions associated with a URL directly as body of the ns_register_proc and friends Example from the man page: ns_register_proc GET /foo/bar/*.php { ns_return 200 text/plain "Server refuses to execute PHP scripts here" }
Reporting security issues?
This looks to me as there is no problem with FreeBSD: you were using a different version of NaviServer on Linux (4.99.16b3 ) and on FreeBSD (4.99.17d5 ), and - at least in the "tip" version there was a problem with the legacy function ns_getformfile depending on the setting of the config file. Instead of using ns_getformfile, one get the value directly from the ns_set. This problem is fixed on bitbucket, more tests were added to the regression test. When you update your configuraton and install,...
Dear David, Can you try the script below, which returns more details about the request and the configuration. You are using the same version on Linux and FreeBSD? The script shows the exact version as well. Please send me the output of the script from both systems. When the problem persists, i'll try to setup a FreeBSD installation... all the best =========================================================================== # # Small test script to check upload settings and behavior. # When called...
Dear David, Can you try the script below, which returns more details about the request and the configuration. You are using the same version on Linux and FreeBSD? The script shows the exact version as well. Please send me the output of the script from both systems. When the problem persists, i'll try to setup a FreeBSD installation... all the best =========================================================================== # # Small test script to check upload settings and behavior. # When called...
Fatal alloc error in ns_mktemp
This bug is a duplicate of issue #77 and is fixed in the current release 4.99.14...
error with ns_configsections in the 4.99.12 release (works in previous releases)
Ajax POST requests to NaviServer/4.99.13 fail.
This report refers probably to a bug-fix in 4.99.11 (see NEWS file); in earlier versions...
The nasty part was, that the bug does not show up with our installations (and my...
Bug in ns_mktemp?
Patrick, you are absolutely right. the bug was introduced in 4.99.13, not sure, where...
error with ns_configsections in the 4.99.12 release (works in previous releases)
The bug is acknowledged and fixed by the following commit. https://bitbucket.org/naviserver/naviserver/commits/5a3a58296eaec2585bddfba9b27bcb6a4cc5bc39...
please send email to me, i'll care for distribution. -g PS:I've replied yesterday...
please send email to me, i'll care for distribution. -g PS:I#ve replied yesterday...