Forum OpenACS Development: Re: Proposed corrections to OpenACS default nsopenssl configuration

Torben,

A couple of other points to go towards this process:

1) This morning I tried to run the installer using a config.tcl based on the one shipping with 5.6.0 only to find that the installer couldn't talk to the db (PostgreSQL). The driver had loaded fine and reported successfully opening the pools in the error log. No errors appeared in the ns_log output.

However as soon as the installer tried to talk to the db to write the data structures, it discovered that it couldn't find psql.

I fiddled around for a while checking the env for the server, and finding nothing amiss then set up nscp and started poking around. I traced the problem to db_get_pgbin and ran through the proc stepwise in the control port.

The upshot is that I reckon that whoever last edited the master version of config.tcl was an Oracle user!! 😉

Why?

Please see lines 526 to 530:

http://cvs.openacs.org/browse/OpenACS/openacs-4/etc/config.tcl?r=HEAD

See anything missing? 😊

2) Lines 399-401 are not helpful guidance. It was on the basis of the 'fixes welcome' that I started this thread. I think the default config.tcl for OpenACS ideally should not announce that it will throw errors and invite fixes.

3) Lines 476-481. Personally I am not happy with the 'might stabilise'. I think we should avoid including settings that differ from defaults without a positive and proven rationale. This does not sound confident enough to earn its place.

Regards
Richard

[response to (1)]

Speaking to what I think you said the original problem was (can't find psql), normally the pg bins are found by setting PATH and maybe also LD_LIBRARY_PATH for the call to nsd.

The committer of 1.41 was Gustaf, and it looks like in line 526 (as well as many other places in the file) he corrected the operator by making this:

if {$database == "oracle"} {

look like this instead:

if {$database eq "oracle"} {

which is the right thing to do as the intent is to compare strings but == is a numeric comparison. That's the only line (526) that had been changed in the range 526-530 since 1.40. It looks like in 1.41 Gustaf wanted to go thru the config file and correct a bunch of instances of the "wrong operator" problem.

By "what's missing" (in lines 526 - 530) you must mean an "else" clause for pg. If an else clause would be put in, what is needed there?

-Jim