formVista™ Installation Guide

Performing a New Installation

Installing formVista for the first time involves:

  1. copying the distribution file to your webserver machine.
  2. unpacking the distribution in the document root.
  3. changing the ownership of the distribution files to match your webserver.
  4. running setup in your web browser.

Unpacking

Use sftp, scp or your favorite method for transferring large files to your webserver to upload the formvista distribution. (e.g. formvista_0.8.9.0.tar.gz).

formVista must be installed under your "DOCUMENT_ROOT", the directory on the server from which your web pages are served. Under CentOS  for instance, the default location for DOCUMENT_ROOT is /var/www/html. Some hosting providers put the DOCUMENT_ROOT under your login directory. Each host may be different. If you do not know where your document files are, please ask your administrator.

Typically formVista is installed in the top level document directory. (i.e. so that is is available from http://www.yourdomain.com/formvista), however formVista can be installed in a subdirectory.

To unpack the distribution first change into your DOCUMENT_ROOT directory:

$ cd WWW

where WWW is whatever your web pages directory is.

$ tar xzf formvista_0.8.9.0.tar.gz

This will create a directory called "formvista".

Permissions

Change the ownership of the formvista files to match the user the web server is running as:

$ chown -R <apache_user> formvista

where <apache_user> is the user your web server runs as. For instance, under CentOS by default the user Apache runs as is "apache".

If you do not know the answer to this, setup will tell you and you can come back to this step.

Running Setup

Once the distribution file has been unpacked, load the formVista setup program using your webbrowser by loading the page:

http://yourdomain.com/formvista/setup.php

where yourdomain is the domain name of your website. If you have installed formvista lower in the subdirectory tree on your website add the appropriate path.

As a first step, setup will create a "setup_password.php" file in the formvista directory and display a message "EDIT BEFORE USING". If you get a permission denied error here, it means the setup program does not have permissions to create files in the formvista directory and you will have to fix that before proceeding.

In your shell session, open the newly create setup_password.php file in a text editor and change the string "replace_with_new_password" with a password of your choosing. You will need to enter the password you choose here into the setup program to continue. You can also pull down the setup_password.php file and edit it locally and re-upload it.

Note: setup has been designed to be rerun as many times as you like. You can safely reload any page and safely go back page and retry them.

Database Settings

formVista requires the use of a MySQL database. In order to access that database, formVista needs to know what host the database server is running on, which is usually localhost. It also needs to know what user and password it should use to connect to the database with.

You may enter the name of an existing database or a new one. If the database name you select does not exist, setup will attempt to create it assuming that the MySQL user you selected has sufficient permissions to create a database.

Security Note: The MySQL password you select is stored encrypted.

The most common error is that the select MySQL user does not have sufficient permissions to create a database. For the security conscious we recommend:

  1. create  a separate MySQL user for formvista to use.
  2. create a formvista database by hand
  3. grant the user created in step 1 just enough permissions to access the formvista database. The user will need the ability to create tables, indexes, alter tables, etc within the formvista database.

    See the
    Mysql GRANT documentation.

    For example, assuming you have access to create Mysql users you could use a command such as the following from a mysql> prompt for create formvista user:

    GRANT CREATE, SELECT, INSERT, UPDATE, DELETE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON <database>.* TO 'formvista'@'localhost' identified by '<password>';

    where <database> is replaced by the database you want to use and <password> by the password for the account. It is strongly recommended that you always put passwords on mysql accounts.

There are some additional fields that need to be set:

  1. Email Notifications to - enter an email address where you would like notifications to be sent to. Notifications are sent, for example, when someone fills out a contact form on the website.
  2. Path to PHP - the location of the "php" command line program on the server. It is usually "/usr/bin/php" or "/usr/local/bin/php". This is used for the cronjobs and utilities.

Note: If the email notifications field is not properly set, you will not receive an email when someone tries to contact you through the website. If the php path is not correctly set, cronjobs such as the daily digest generator for the forum will not work.

Click next.

Post Setup Steps (optional)

Some extra features of formVista require that background processes, also called cronjobs,  be run at regular intervals. For instance, if you want daily digest emails to be sent to all of your forum users, you will want to run the 'forumsNotifier' which actually sends out the emails.

A cronjob is a program run by the "cron" process on a Unix/Linux machine. When to run which program is determined by the cron table.

The programs intended to be run as cronjobs are located in the formvista/crontabs directory. The cronjobs there are:

  1. forumsNotifier - sends out digest summary emails of forum activity once a day to any users who are subscribed to any forums on the site. Handles any number of users and any number of forums. Designed to be run once a day
  2. rssGenerator - creates an RSS feed from blogs and forums. Designed to be run every half hour.
  3. mailingProcessor - sends out scheduled email newletters/announcements. Designed to be run every 15 minutes to check for scheduled mailings.
  4. bounceProcessor - checks a POP3 email account used to hold bounce messages from mailings. Designed to be run every 15 minutes.

To enable these cronjobs to be run from cron at regular intervals you must use the "contab -e" command to enter cronjob entries.

See the documentation for crontab.

For example to run the forumsNotifier at 3:30AM every day you would add a line like the following to your crontab using the crontab -e command:

30 3 * * *  path/formvista/cronjobs/forumsNotifier/forumsNotifier.php > path /formvista/site_local/var/logs/forumNotifier.log.php

Where path is the path on the server to your formvista installation. We recommend redirecting the output of the cronjobs to the var/logs directory as they do generate output.