Forum OpenACS Development: Installing 5.2.3 Core: problems and questions.

I just installed OpenACS Core 5.2.3. Looks great, but I did run into a few problems. The easy one is that if postgresql version is older, you need to set some compatibility flags in data/postgresql.conf:

$ vi /usr/local/pgsql/data/postgresql.conf
# VERSION/PLATFORM COMPATIBILITY
#---------------------------------------------------------------------------

# - Previous Postgres Versions -

add_missing_from = on
default_with_oids = on
regex_flavor = extended         # advanced, extended, or basic

#-------------

The symptom during install is pretty ambiguous even with the full postgresql log file. It looks like a foreign key constraint violation.

Once I solved this issue I ran into a real bug, a typo in openacs-5.2.3/packages/acs-kernel/sql/postgresql/utilities-create.sql:

        for v_rec in EXECUTE ''select '' || quote_ident(v_sequence_name) ''.nextval as a_seq_val''

Should be:

        for v_rec in EXECUTE ''select '' || quote_ident(v_sequence_name) || ''.nextval as a_seq_val''

The last question I have is if I look at http://www.openacs.org/projects/openacs/download/ I don't really know if the entries are sorted by date or what. Is 5.2.3 Core newer than the other releases? All I want is the core install, but I don't see any dates on the entries, so it is hard to tell how new/old 5.2.3 is.

Collapse
Posted by Tom Jackson on

I should also say that this version seems much easier to install than the last time I did it. I already had AOLserver and postgresql installed. So, maybe I should point out that a lot of the install instructions are not exactly necessary for the postgres version. The main tasks were to:

  1. Create the user/database (while postgres):
    $ createuser openacs
    $ createdb -T template1 -O openacs -U openacs -E UNICODE openacs 

    Where openacs is the name of the user and the database. It isn't necessary to have a system user named openacs, although there could be security benefits. I'm not sure the longer install method realizes these benefits. If a goal is simple installation, maybe the system user stuff could be an optional step?

  2. Recompile the nspostgres db driver with ACS=1
  3. $ cd aolserver/nspostgres
    $ make clean
    $ make ACS=1
    $ make install
     
  4. Add a new virtual server, which required a new nssock and binding entry, new database pools using the openacs user and db name, then I had to point the private tcl library to /web/openacs-5.2.3/tcl and the pageroot to /web/openacs-5.2.3/www. The entire startup, with configuration is here: http://junom.com/document/openacs/server-log/
  5. Restart AOLserver and browse to the web address.

  6. If something goes wrong during step 4, then as postgres do:

     $ dropdb openacs
     
  7. And then repeat steps 1 and 4.
Collapse
Posted by Tom Jackson on

In package manager, while trying to load a package from a remote url, ad_return_top_of_page is used. The default for the content_type is "text/html". In this proc, [ns_startcontent -type $content_type] is called. In AOLserver 4.5, this is guaranteed to fail if there is not a charset spec like "text/html; charset=utf-8". As a quick fix, I have changed the default.

From acs-tcl/tcl/utilities-procs.tcl I made this change:

ad_proc -public ad_return_top_of_page {first_part_of_page {content_type "text/html; charset=utf-8"}} { 
...
} {
    set all_the_headers "HTTP/1.0 200 OK
MIME-Version: 1.0
Content-Type: $content_type\r\n"
    util_WriteWithExtraOutputHeaders $all_the_headers

    ns_startcontent -type $content_type

    if { ![empty_string_p $first_part_of_page] } {
	ns_write $first_part_of_page
    }
}

However, this might be a bug in 4.5 to not return the default, outputcharset. This proc could look up the information itself, and/or ensure that there is a charset in the passed in value... and/or return an error prior to calling ns_startcontent which informs the user of the problem.

After that problem was fixed, I got an error on exec (child process exited abnormally). However there is no indication if the file was downloaded or what the error was. Many times exec'ed commands can write to stderr tricking catch into believing an error occured. Has anyone got this to work? Here is the command:

"exec [apm_gunzip_cmd] -q -c $file_path | [apm_tar_cmd] tf - 2>/dev/null"
Collapse
Posted by Gustaf Neumann on
Tom,

why are you trying so hard to install an old version?
The bug with the install problem you are mentioning was fixed 16months ago by Rocael (also in the 5.2 branch) http://cvs.openacs.org/cvs/openacs-4/packages/acs-kernel/sql/postgresql/utilities-create.sql?only_with_tag=
The problem with charsets for aolserver 4.5 was as well fixed some time ago.

OpenACS 5.2.3 is quite old right now (can it be that you wanted to install oacs 5.3.2?) If you really want to got for 5.2.3, i would recommend to make an update from cvs.

Collapse
Posted by Tom Jackson on
Strangely, after looking at the first n-1 entries in the table, I assumed the final one must be the newest! I guess most users would have just given up and moved on to some other project. Which download should I get if I want a stable version? Anyone know if the 'download package from remote' is working, or if it fails, is it more clear why? It appears the download works, at least according to the remote server's logs, but the file just evaporates. Anway, the working hard has paid off, it shouldn't take much time (like a few minutes) to download and install the new version. I was wondering why folks think this is so hard and time-consuming, at least with postgres.
Collapse
Posted by Gustaf Neumann on
The openacs download application is indeed not state of the art (strange order, no dates, hard to correct inconsistent naming). Maybe this can be improved by the OpenACS site overhaul.

Get OpenACS 5.3.2 Final. Find relevant versions via announcements: https://openacs.org/news/?view=archive

After getting 5.3.2 installed, download package from remote is supposed to work.

Collapse
Posted by Tom Jackson on
Thanks for the info!

I think that the ns_startcontent issue is partly an AOLserver bug. The code comments suggest that there should be a reasonable default returned if no charset is present in the -type string. OpenACS has traditionally been the lead on this functionality (it seems to me anyway), developers here seem to know more about it. Is there a need for defaults in the AOLserver API, there is real source code/config setting/naming confusion in AOLserver. There are a number of related things: filename endings, char encodings, charsets (and charset names), mime-types, content-types. The config file tries to map some of these to each other. In addition, there is now, at least in the C API, a way to map input-charsets to a url, same as a filter map.

Collapse
Posted by Gustaf Neumann on
Let me add the following problem-fields of mimetypes being a source for confusion (esp. for file uploads): openacs has its own cr_mimetypes, there are different sources for standardizing extensions/mimetypes (e.g. IANA, apache config), furthermore different browsers get for different operating system different mimetypes when uploading files, which is a moving target. the whole issue is messy, but i guess there is room for improvement in openacs.