Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 11

## Index ##

License
Basic requirements
For those in a hurry ...
Copying files and setting file and folder rights
The configuration file
Database connection
Authentication Settings
Section SMTP and e-mail
section Debug
section Log
section Path
section FOP
Section attachments and links
section Misc
Configuration File Inclusion
automatic installation procedure
Manual installation steps
After installation
system initialization
Test of VFront settings
## Basic Requirements ##
To work VFront needs the following software:
* Apache Web Server 2.x (the application has been developed and tested for t
he Apache 2.x server,
might work with other Web servers)
* MySQL 5.x or PostgreSQL 8.x (Warning PostgreSQL support is in alpha stage)
* PHP version 5.x
The following modules are also required for PHP:
* Php_mysqli (MySQL Improved) - if you use a mysql database
(Or you want to authenticate using an external MySQL server)
* Php_pgsql (library Postgres) - if you are using a postgresql database inst
ead
(Or you want to authenticate via external postgresql server)
Optionally, you also require the following modules
* Php_gd2 - GD library version> = 2.x
* Php_xsl for the use of server-side XSL transformations.
If you did not have a chance to use this extension you can still use
transforms the client side.
* Php_ldap - if you wanted to set the external authentication via LDAP
* Php_odbc - if you wanted to set the external authentication via ODBC
* Php_soap - if you wanted to set the external authentication via SOAP (expe
rimental)
The statistics section instead uses PEAR (http://pear.php.net/) for graphics gen
eration.
Therefore PEAR is required, as well as the PEAR packages:
* Image / Graph (http://pear.php.net/package/Image_Graph)

* Image / Canvas (http://pear.php.net/package/Image_Canvas) as a dependency


of image / Graph
Note: at the time of writing the Image_Graph package is up to release 0.72.
This release has a small bug in benerazione of pies labels,
that do not show up without generating any error. To solve the problem
use the CVS version of the file Image / Graph / Plot / Pie.php recoverable from
address
http://cvs.php.net/viewcvs.cgi/pear/Image_Graph/Graph/Plot/Pie.php?content-type=
text%2Fplain&view=co

## For those in a hurry ... ##


1. Unzip the contents to a folder within your docroot and name the folder as
VFront.
2. Open the conf / conf.vfront.php file and set the parameters according to
the comments in the file
3. Open the inc / conn.php file and to include the actual path of the configu
ration file conf.vfront.php
4. Run the installation from http: // servername / path_vfront / _install /
5. Log in to the administration of Vfront, initialize and configure GUI right
s and tables.
6. As soon as you have more time read the rest of the document ...

## Copy the files and setup in file and folder rights ##


Unpack the Vfront install file into your chosen directory.
The directory structure should look like this:
VFRONT_ROOT
- _install
- admin
- conf
- files
-- docs
-- tmp
-- xls_custom
- html
- img
- inc
- js
- plugins
-- FCKeditor
-- ods
- stats
- sty
- tmp
- usr
- xml
Some folders need to be writable by Apache. These are:
* Files and its subfolders

* html
* tmp
If you want to use the debug using the file rpc.debug.txt (see besides for a des
cription)
then this file also needs to be writable by Apache.

## The configuration file ##


The configuration file is called conf / conf.vfront.php.
For safety reasons, it is suggested to move the conf folder to an area outside o
f the web root folder.
Through the configuration file you can set most of the parameters for VFront.
Other parameters relating to the use and appearance will be set by the administr
ation area
and the configuration of the table "variable variables".

## Database connection ##
The first section of the configuration file is for the database connection.
You can choose whether to use VFront as a front end for a MySQL 5.x database or
a PostgreSQL 8.x database
Please remember that while support for MySQL 5.x has had numerous tests and real
-world applications,
support for PostgreSQL is the still unstable and should be considered in alpha s
tage at present.
The parameters required are:
$ Db1 [ 'dbtype'] = "mysql";
// Indicates the type of database: can be "mysql" or "postgres". It MUST be spec
ified
$ Db1 [ 'host'] = "localhost";
// Server host:
$ Db1 [ 'port'] = "3306";
// Server Port: default 3306 and 5432 for MySQL for PosgreSQL
$ Db1 [ 'user'] = "username";
// User to connect to the database
$ Db1 [ 'Set Password'] = "secret";
// Password for the database connection
$ Db1 [ 'dbname'] = "bank";
// Database name: For postgres use "public", that is, the schema name
$ Db1 [ 'frontend'] = "vfront_test";
// Name of VFront database. In postgres it should match the schema name (we sugg
est "frontend")
$ Db1 [ 'postgres_dbname'] = "database_name";
// Real name of the database (only if you use Postgres)

## Authentication Settings ##
VFront allows authentication using your own table "user" or by another system.
The authentication logic and the accreditation of user rights are in fact separa
ted.
When you use external authentication (for example, using LDAP) if the user exist
s is
automatically authenticated on VFront.
The next step will be the accreditation of rights through the User table:
if the user exists on LDAP and not on the user table you will be automatically e
nrolled in this,
and will be assigned the default rights (group 0). For more information about us
ing groups
and the rights of users, refer to the documentation of VFront.
The parameter for authentication is
$ Conf_auth [ 'tipo_external_auth'] = '';
If set = '' or = null authentication will be done through the VFront database an
d its user table.
The other possible parameters at the moment are
* 'Db': indicates authentication through another database on the same server
(MySQL only)
* 'Db_ext' indicates a MySQL database, PosgreSQL or loosely connected via OD
BC, on another server
* 'Ldap': indicates authentication using LDAP servers such as OpenLDAP or Ac
tive Directory
* 'Soap': indicates authentication by linking SOAP WSDL. This type of authen
tication is experimental.
If you set one of these parameters then these other variables are required:
$ Conf_auth [ 'campo_email'] = 'email';
// Indicates the database field name or LDAP to retrieve the user's email,
// Used for authentication
$ Conf_auth [ 'campo_password'] = 'passwd';
// Indicates the database field name or LDAP to retrieve the user's password,
// Used for authentication
$ Conf_auth [ 'campo_nome'] = 'name'; // optional
// Indicates the field name of the database or LDAP to retrieve the user's name
$ Conf_auth [ 'campo_cognome'] = 'name'; // optional
// Indicates the field name of the database or LDAP to retrieve the user's name
$ Conf_auth [ 'password_crypt'] = 'md5'; // Md5 | sha1 | null
// If the passwords were stored as hash md5 or sha1 set this parameter

- Authentication via database present on the same server (MySQL)


If you choose external authentication via a database different from VFront, set
the following parameters:

$ Conf_auth [ 'db'] [ 'database'] = 'database_name';


// Must reside on the same server (MySQL Only) - for other servers use DB_EXT, S
OAP or other methods
$ Conf_auth [ 'db'] [ 'Table'] = 'table_name';
// Name of the table to be queried for authentication

- Authentication via external database and / or resident of another server (MySQ


L, PostgreSQL, ODBC)
If you choose external authentication via external database and | or resident o
n another server,
set the following parameters
$ Conf_auth [ 'db_ext'] [ 'dbtype'] = "mysql";
// It can be "mysql" or "postgres" or generically "odbc"
$ Conf_auth [ 'db_ext'] [ 'host'] = "localhost";
// The Host of the external DB server used for authentication
$ Conf_auth [ 'db_ext'] [ 'port'] = "3306";
// Port of the external DB server used for authentication:
// The default for 3306 and 5432 for MySQL PosgreSQL
$ Conf_auth [ 'db_ext'] [ 'user'] = "user";
// User for authentication
$ Conf_auth [ 'db_ext'] [ 'Set Password'] = "boat";
// password
$ Conf_auth [ 'db_ext'] [ 'dbname'] = "vfront_test";
// Name of the database
$ Conf_auth [ 'db_ext'] [ 'Table'] = "user";
// Table name
$ Conf_auth [ 'db_ext'] [ 'odbc_dsn'] = "";
// Only for ODBC connections: write the DSN

- Authentication using LDAP or Active Directory


If you chose external authentication (LDAP or Active Directory) set the followin
g parameters:
$ Conf_auth [ 'ldap'] [ 'base_dn'] = 'o = Server Name, c = US';
// Complete the LDAP server DN
$ Conf_auth [ 'ldap'] [ 'host'] = 'localhost';
// Host of the LDAP server

- Authentication using SOAP (experimental)


The SOAP authentication is experimental and for now is based on WSDL files
If you chose external authentication using SOAP set the following parameters:
$ Conf_auth [ 'soap'] [ 'wsdl'] = '';
// Http (s) of the WSDL file
$ Conf_auth [ 'soap'] [ 'function_get_user'] = '';
// Function name to query the list of users
$ Conf_auth [ 'soap'] [ 'function_get_user_results'] = '';
// Function name to retrieve user data

Section ## SMTP and e-mail ##


VFront uses the PHPMailer class to send emails.
For further details, see http://phpmailer.sourceforge.net/
You can configure sending email over SMTP using the following parameters:
$ Conf_mail [ 'SMTP_AUTH'] = false;
// Indicates whether to use a custom SMTP. Otherwise it will use the default SMT
P server.
// The following three variables need to be set if the SMTP authentication is se
t to TRUE:
$ Conf_mail [ 'SMTP'] = "";
// SMTP address to use if you want to make use of personalized SMTP
$ Conf_mail [ 'SMTP_AUTH_USER'] = "";
// SMTP user
$ Conf_mail [ 'SMTP_AUTH_PASSW'] = "";
// Password smtp
$ Conf_mail [ 'MAIL_SENDER'] = "";
// Email sender for submissions made by VFront (mainly for debugging)
// Eg "noreply@vfront.org"
$ Conf_mail [ 'MAIL_SENDER_NAME'] = "";
// Plain text name of the sender of emails sent by VFront
// Such as "Admin VFront"
You also need to set these constants:
// Mail system administrator
define ( '_ SYS_ADMIN_MAIL', 'admin@vfront.org');
// Mail the developer (for debug email)
define ( '_ DEV_MAIL', 'dev@vfront.org');
The developer's email can be useful if you want to get a debug sent to the devel
oper.
Emails are sent when VFront generates an error and debugging is set FALSE (see n

ext section).

## Debugging Section ##
The debug section consists of three variables described here:
// Screen errors | errors in email
$ DEBUG_SQL = true;
In a production environment it is recommended to set the variable to FALSE: in c
ase of error
you will be sent an email to the administrator and the developer. In this case i
t will inform you on screen that an error has been generated.
If the variable is TRUE the errors and the SQL will instead be displayed on the
screen.
$ RPC_DEBUG = true;
// Write the SQL calls in a file (default ./rpc.debug.txt) - default: FALSE
This feature can be very useful to read what VFront performed by external calls.
The ./rpc.debug.txt file must be writable by Apache.

## Section ## Log
This section presents one variable that enables or disables the log.
The VFront log allows you to record the date, time, and author of all the transa
ctions carried out
through the forms, shows a historical record and allows a rollback of cancellati
ons and changes.
It is strongly recommended that the parameter is set to TRUE.
$ RPC_LOG = true;
// Writes a log of calls SQL insertion, modification and deletion - default: TRU
E

section Path
In this section the web addresses are configured for VFront on the server:
// Real path
define ( 'FRONT_ROOT', 'D: / htdocs / vfront_test');
// Real path
define ( 'FRONT_REALPATH', 'D: / htdocs / vfront_test');
// Path of the document root
define ( 'FRONT_DOCROOT', 'http: // localhost / vfront_test');

// In most of the following cases the variables may be left as they are:
// Path mysqldump (for MySQL export) - Default: mysqldump
define ( '_ PATH_MYSQLDUMP', "mysqldump");
// Path pg_dump (for the export of Postgres) - Default: pg_dump
define ( '_ PATH_PG_DUMP', "pg_dump");
// Path to the attached file system
define ( '_ PATH_ATTACHMENT', FRONT_REALPATH. "/ files");
// Path to tmp file system for attachments
define ( '_ PATH_ATTACHMENT_TMP', FRONT_REALPATH. "/ files / tmp");
// Path to the file system useful documents
define ( '_ PATH_HELPDOCS', FRONT_REALPATH. "/ files / docs");
// Tmp path accessible via web
define ( '_ PATH_TMP', FRONT_REALPATH. "/ tmp");
// Path to the XSL style sheets attached
define ( '_ PATH_XSL', FRONT_REALPATH. "/ files / xsl_custom");
// Web path to the XSL style sheets attached
define ( '_ PATH_WEB_XSL', FRONT_DOCROOT. "/ files / xsl_custom");

## Section FOP ##
VFront uses Apache FOP (http://xmlgraphics.apache.org/fop/) for XSL-FO transform
ations
and reports generated in PDF.
FOP is not distributed with VFront, but it should be downloaded and installed se
parately.
// Sets whether Vfront can use the application FOP (true or false)
define ( '_ FOP_ENABLED', true);
// Path to FOP on the server:
//define('_PATH_FOP','C:/fop-0.20.5/foptest/fop.bat ');
//define('_PATH_FOP','/usr/local/fop/fop.sh ');
The Apache server must have FOP for the functions to work.

Section ## Annexes and links ##


Each table in the database on which you're running VFront can be potentially
enabled with support for attachments and links. The following parameters are usu
ally OK
and you should only change them if there are other tables for attachments and li
nks.
Note that in this case the field names should coincide with those
of the database VFront tables.

// Definition of the annexed table


define ( '_ TABELLA_ALLEGATO', "{$ db1 [ 'frontend']}. Annex");
// Definition of the link table
define ( '_ TABELLA_LINK', "{$ db1 [ 'frontend']}. link");

## Section ## Misc
In this section various kinds of constants are defined:
define ( '_ MAX_TEMPO_EDIT', 240);
VFront is designed as multi-user front-end: to avoid concurrent write access to
the same record, there is a "lock" procedure of the individual records when they
are
opened for editing by a user. This constant expresses in seconds the maximum tim
e
for which the records should be considered locked (default 240 seconds, or 4 min
utes).
define ( '_ BASE64_PASSFRASE', "passphrase");
In some operations it uses a base64 encoding of parameters in URLs.
This constant sets a sentence for encoding.
define ( '_ IMG_LOGO', FRONT_DOCROOT. '/ img / vfront090.jpg');
This indicates the path of the logo in the upper left of the VFront pages
define ( '_ NOME_PROJ', 'VFront');
Set the name of VFront interface (for example "Front-end Library" or simply "VFr
ont")

## Configuration File Inclusion ##


As a final setup open the inc / conn.php file and
set the path to the actual configuration file.
################################################## ##
#
# CONNECTION TO FILE CONF
#
// eg
require_once ( "D: /htdocs/vfront_test/conf/conf.vfront.php");
// or
require_once ( '/ var / www / vfront / conf / conf.vfront.php ");

## Automatic Installation Procedure ##


VFront possesses an automatic installer. Before starting the procedure, make sur
e the the
conf.vfront.php file is properly configured.
The installation procedure is started directly from the web using the url:
http: // servername / path_vfront / _install /
The process will take
1. The path of the configuration file, which will be read for installation
2. high-level authentication on the database (root or the like) to create the
tables,
the user specified in the CONF file and the rights reserved to them
3. e-mail and password for the first user (the administrator)
During installation, you can take a look at the query you are about to perform.
After installation it is advised to delete the folder _install for obvious secur
ity reasons.

## Manual Installation Procedure ##


If you do not want or could not run the automatic installation procedure, procee
d as follows:
1. make sure that the file is correctly configured conf.vfront.php
2. Edit the inc / conn.php file for the correct path to the configuration fil
e
3. Create the database user specified in the conf files and assign user right
s
(SELECT, DELETE, INSERT, UPDATE) as well as the SHOW VIEW rights to the da
tabase you want to read with VFront
4. Assign the user rights on the VFront database (or schema of Postgres)
5. Assign rights to read on 'information_schema if necessary
6. Run the database server _install / vfront.mysql.sql file or _install / vfr
ont.postgres.sql
depending on the DB that you want to use
7. Create a user in the "user" of the database (or schema) of VFront having l
evel = 3 and the group = 0.
Please note that the password must be expressed in the md5 hash.
To generate an md5 hash of your password using md5 shell (Linux)
or use one of many converters available on the web, for example. http://pa
jhome.org.uk/crypt/md5/
After installation it is advised to delete the folder _install for obvious secur
ity reasons.

## After installation ##

system initialization
After the installation you must initialize the system.
VFront must read the information schema and enter the database information that
you
have set up in your tables. To do it
1. login with the sysadmin account
2. Go to the administration section
3. In the first menu, select "Initialize registers"
This starts an automatic procedure that will create the ground rules for accessi
ng the tables.
For the configuration of the tables refer to the reference manual VFront.
VFront settings Test
It is also suggested to access the Administration menu,
under "other business" and run the "Test VFront settings".
For more information, please refer to the reference manual VFront.

You might also like