Forum: a web interface for the bookkeeping of ducuments

READ ME

The Forum product is designed to be an easy tool to organize the publishing and bookeeping of documents of a collaboration on the web.

Every collaborator can publish a document connecting to a forum web form and filling in related information: the author, the title or a list of key words, the date, the url where the document is kept, weather the document is public or private within the collaboration.

This information is stored in an msql database. Every member of the collaboration can see all the documents (public and private), publish new ones, delete old ones and make public documents that are private and vice versa.

INSTALLATION GUIDE

What is in Forum

The Forum product is made of 2 packages:
  • the client web pages: this is a set of html forms and javascript. Accessing them using a web browser, one can send the web server a reading/writing request to the the msql database.
  • the server cgi: the csh scripts and c programs that receive reading/writing requests from the clients, connect to the msql database, retrive/write data from/to the database, send information back to the client.
  • Requirements

    These are the requirement to run the Forum product:
  • running a web server (the product has been extensibly tested with Apache v1.2).
  • running an msql server either local or remote with respect to the web server. The Forum product has been used with msql v1.0.16a
  • Step by step

  • Check configuration and build:

    The default version expect an msql server running on the same machine where the web server runs. You can change this by editing the file src/forum.h

      + edit line:   #define DEFAULT_HOST "xxxx.fnal.gov"
      + change line: #define CONNECTION_TYPE LOCAL_CONNECTION_TYPE
         to          #define CONNECTION_TYPE REMOTE_CONNECTION_TYPE
    
    Build typing
       
       > setup msql  #the Fermilab ups setup command
       > cd src; make
    
  • Create a new database called "forum".

    If you have a database in place that you want to use, you can change the name of the database editing the file src/forum.h at

    #define DATABASE "forum"
    and recompiling.

    NOTE THAT wwwsrv USER MUST HAVE PRIVILEGES TO READ/WRITE THE DATABASE
    With msql v1.0.16a this is achieved by the use of the file msqldata/OSF1/msql.acl (depending on the msql configuration this may vary), that must look like

      
      database=forum
      read=*
      write=msqladm,wwwsrv
      host=*.fnal.gov
      access=local
    
  • Create the forum table structure.

    You can use the msql interface provided by msql i.e. the "msql" command.

  • Edit a file called for example forum.msql:
         # Begin miniSQL script
         create table forum (
     	     author           char(40),
     	     title            char(500),
     	     document_date    char(10),
     	     stdtimeDoc       int,
     	     publishing_date  char(10),
     	     stdtimePub       int,
     	     privileges       int,
     	     url              char(100)
         )
         \g
         # End miniSQL script
      
  • cat forum.msql | msql forum
  • Note that you can change the name of the table (also in order to mantain multiple forum) by changing the "value" field of the lines like

    < input type="hidden" name="table" value="forum">
    in the following documents of the client side:
     html/index.html
     html/private/delete.html
     html/private/index.html
     html/private/privilege.html
     html/private/search.html
       
    There is one change per file to make.
  • Client installation: the html directory.
  • Copy the content of the whole html directory in an area served by your web server. Make sure to preserve symbolic links (i.e. you can use cp -R html /path-to-your-area/ ).
    This is the main URL for the forum interface.
  • Set protection on the /path-to-your-area/private/ directory
  • Server installation: the cgi-bin directory
  • Create a subdirectory of your web server cgi-bin directory called msql-cgi-bin.
    If you want a different name you have to change it in the lines that look like
        < form name="forumsearch" 
        action="/cgi-bin/msql-cgi-bin/search.csh" 
        method="get">
    
    in the following documents of the client side:
     html/index.html
     html/private/delete.html
     html/private/index.html
     html/private/privilege.html
     html/private/search.html
     
    There is one change per file to make.
  • Copy the content of the directory cgi-bin in the msql-cgi-bin dir
    cp cgi-bin/* /path-to-cgi-bin/msql-cgi-bin/
    
  • Allow execution of files in the new msql-cgi-bin area With Apache v1.2, this is done by editing the file
    /path-to-the-server/conf/srm.conf
    
    adding a line like
    ScriptAlias /cgi-bin/msql-cgi-bin/ /path-to-cgi-bin/msql-cgi-bin/