Begin main content
Search · Index
No registered users in community xowiki
in last 10 minutes


Showing 1 - 8 of 8 Postings (summary)

Empty Textfields not empty on Ubuntu Aolserver

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 16 Jul 2014, at 03:20 AM

If Aolserver is compieled on Ubuntu (14.04), Textfields produced by form builder (ad_form), which have a empty string as value set, show a single special symbol inside the rendered Textfield as well as in the source html (value="" attribute). The Symbol is usualy the Browsers symbol for a unrecognised character code.

This is caused by Aolservers ns_quotehtml function, and happens only if a empty string is quoted, in which case a end of string code is returned. The C function is actually just initialising a Tcl_DString which is unchanged, because their is nothing to quote, set as the result using Tcl_DStringResult.

Changing Tcl_DStringResult(interp,dsptr) to
Tcl_SetResult(interp, dsptr, TCL_VOLATILE)
solved the error.

Even so this is working it might lead to longer execution times as well as higher memory requirements, because the string is always copied to the interp's result, instead of setting the interp's result to point to the DStrings value, which Tcl_DStringResult does if possible. This problem occurs on Ubuntu only, so it is likely that some compiler defaults, used to compile TCL, are causing this error. The error was discovered with tcl8.5 and tcl8.6 (tcl8.4 not tested).

This patch can be used to fix it.


myuser cd /tmp
myuser wget
myuser cd /usr/local/src/aolserver-source-dir/
myuser patch -p0 < /tmp/nspostgres-interp-result-0.1.1.patch
myuser make install

Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/bin/

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 02 Jul 2014, at 01:53 PM

on Ubuntu (12.04 LTS, 14.04 LTS) the Error

Warning: modload: could not find Ns_ModuleInit in /usr/local/aolserver/bin/

The same problem appears when trying to load other optional modules like There are several threads that recommend to add -Wl,no-as-needed to the CFLAGS in each Modules Makefile, which is required. If this still does not fix the Problem, check the output of make, if the Flag '-fvisibility=hidden' is passed to gcc. It will hide all Symbols, unless explicitly specified as public within the source code. The option is "just" an optimization and can be removed from the ns.mak file without greater harm (on Suse it is not set in first place), this is the first solution. The second and better solution is to patch the source code, and add required attributes to the Function Ns_ModuleInit and the Variable Ns_ModuleVersion, which advise gcc to export this symbols and make them access able from outside the module (public), but this has to be done for each Module. Below you find links to patches for the most common Aolserver modules including a description on how to apply them.

First Solution:
The Flag is set in the File

The Line
CFLAGS_EXTRA = -fPIC -pipe -fvisibility=hidden
can be changed to

Second Solution:
First download the patches to the /tmp directory. Then apply the patches by changing into the modules source directory and run the patch command.

root#> cd /tmp
root#> wget
root#> cd /usr/local/src/aolserver-src-dir/nssha1/
root#> patch -p0 < /tmp/nssha1-visibility-0.1.1.patch

Now compile the Module as usual.
The procedure for the patches below is the same, just the patch name and the source directory needs to be changed for the current module.

nsopenssl-visibility-0.1.4.patch (path flag -p1 instead of -p0 to the patch command)

error: 'Tcl_Interp' has no member named 'result' in /usr/local/src/aolserver/nsopenssl/tclcmds.c

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 02 Jul 2014, at 01:47 PM

when trying to compile nsopenssl for tcl8.6 the Error

tclcmds.c:338:31: error: 'Tcl_Interp' has no member named 'result'

In tcl8.6 the interp objects fields cant be accessed directly anymore, instead tcl8.6 offers a API to manipulate the fields of the interp object ( Below is a patch which fixes the Error, including a brif description on how to apply the patch.

root#> cd /tmp
root#> wget
root#> cd /usr/local/src/aolserver-src-dir/nsopenssl/
root#> patch -p0 < /tmp/nsopenssl-interp-0.1.1.patch


generic/tcldom.c:5937:47: error: ‘Tcl_Interp’ has no member named ‘errorLine’

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 26 Jun 2014, at 05:50 PM

When compiling tDOM.0.8.3 for tcl 8.6 the error:

./generic/tcldom.c:5937:47: error: ‘Tcl_Interp’ has no member named ‘errorLine’

The interp objects variable members cant be accessed directly anymore, instead there are functions to manipulate their values.

Can be solved by

First and quick Solution:
Editing the Makefile and add the CPPFLAG -DUSE_INTERP_ERRORLINE . The use of interp->errorLine is deprecated, possibly this fix will not work in the future.
The solution is mostly take from this post

Second Solution:
Change tcldom.c to use the new functions to manipulate the errorLine and/or the resultLine of the interp object.

Postgres large SHMMAX SHMALL SHMNI Semaphore Kernel configuration

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 30 Jan 2013, at 08:48 AM

Memory Kernel configuration for a Postgres Server with a large settings for shared_buffers, max_connections and max_fsm_relations.

Example based on a I7 HexaCore System with 64GB RAM, and a Postgres install with shared_buffers=40GB , max_connections=15000 , max_fsm_relations=50000.

# Callculate SHMMAX setting from postgresql.conf parameters.
# lock size = ~270 bytes
# shared memory for locks = (max_locks_per_transaction * (max_connections + max_prepared_transactions) * 270)
# connection size = ~400 bytes
# shared memory for connections = max_connections * 400
# shared_buffers = 54GB
# shared memory for buffers = 54 * (1024 * 1024 * 1024)

# SHMMAX = (max_locks_per_transaction * (max_connections + max_prepared_transactions) * 270) + (max_connections * 400) + (54 * (1024 * 1024 * 1024))

# Increasing the Kernels SHMMAX parameter ~49GB, for the exact requirement of your Postgres install check the server.log after first start, if the SHMMAX setting is to small Postgres will log the exact amount required.
root echo "53162803200" > /proc/sys/kernel/shmmax

# Increasing the Kernels SHMALL parameter ~51GB , you can adjust this settings depending on your system configuration, usually SHMMAX + 2147483648 (+2GB) will do.
root echo "55144046592" >/proc/sys/kernel/shmall

# Increasing the Kernels max settings for Semaphores
root echo "500 16384 32 16384" >/proc/sys/kernel/sem

# To make this settings permanent, as root, edit the file /etc/sysctl.conf and add the following lines to the end of the file.

root emacs /etc/sysctl.conf

kernel.sem=500 16384 32 16384

# To let changes to /etc/sysctl.conf take immediate effect, as root issue following command.

root sysctl -p /etc/sysctl.conf

# To check the current kernel settings, issue the following commands, as root

root cat /proc/sys/kernel/shmmax

root cat /proc/sys/kernel/shmall

root cat /proc/sys/kernel/sem
500 16384 32 16384

daemontools starting using systemd instead of inittab OpenSUSE 12

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 12 Jan 2013, at 05:22 AM

How to use systemd instead of inittab to start svscanboot from daemontools.

1. As root create a file in /etc/systemd/system/ called daemontools.service and paste the following lines into it and save the file.

Description=daemontools Start supervise

ExecStart=/command/svscanboot /dev/ttyS0


2. Start the service using the following command (as root).

root%> systemctl start daemontools.service

3. Test if the service is running.

root%> systemctl status daemontools.service

Parallel install of OpenJDK and OracelJDK

Created by Bjoern Kiesbye, last modified by Bjoern Kiesbye 15 Aug 2012, at 02:14 PM


I found a very good how to install Oracels JDK on a openSuse 12.1 installation where a openJDK is already installed and running. It explains how to have both versions not just installed, but accessible from command line and Browser. I in different to the How to gave the OracelJDK a higher priority (17105 for Java an 17106 for the Java Browser Plug-in) so it is used by default. With OracelJDK as default the German online TAX ( system is working with Linux as well (it does not with OpenJDK).

Here is the How To:
ToDo: German translation.

Index Page

Created by , last modified by Bjoern Kiesbye 15 Aug 2012, at 02:02 PM

This is the default start page of XoWiki. You can edit this page and save it to provide a personalized look of the XoWiki instance. You can as well provide a different index page through configuration. You can also view the contents of the Wiki in a weblog style. For more details, consult the XoWiki documentation .

A user can define notifications for the whole XoWiki instance (by clicking on the notifications button in the menu bar or for categories (by clicking on the letter symbol next to the category entries at the bottom of the page)