Sahana Advanced Web Setup


The sahana advanced web setup, is an extended version of the existing sahana web setup, in order to include more advanced installation options, as well as to make the installation process more user friendly and robust.

The Web Setup Process

The web setup process has been broken down in to three categories which provide different levels of customizability. The y are as follows.

  • The simple setup - Same as the existing setup, except that the requirement of a 8 character password has been dropped out.
  • The advanced setup - Provides the highest level of customizability by providing options to change the system wide password policy, and other system wide configuration values.
  • The scenario based setup - Provides a relatively low customizability compared to the advanced setup, but is more concerned on setting up only the necessary modules for a given scenario. (Even though additional modules may be selected).

How it works

The first time the sahana main page (index.php) is requested, it hands over control to the setup controller (setup.php) (different from the front controller due to its architecture) which in turn controls the entire setup process.
Each step of the setup is defined as a STATE. The setup.php has a mapping from states to a set of four core functions. They are as follows.

  • PAGE - The function to be called to show the required setup step. (Form) *REQUIRED
  • VALIDATE - The function to be called to validate the page data. (Validate Form Data) *REQUIRED
  • NEXT - The function to be called to do some action , (should call the next step function in code.) *REQUIRED
  • BACK - The function to be called when the user clicks the back button on the page. *REQUIRED IF The page has a Back Button.
  • CH_STATE - The function to be called to change the current state. This will be executed soon after calling the NEXT function. OPTIONAL
  • ON_COMPLETE - The function to be called at the end of the setup to complete and commit any required changes to the database or file system or any other means.

The mapping for the simple setup is as follows.

global $_state_funct_map;
$_state_funct_map = array(
	'CHECK_DEPS'=>array(	'PAGE'=>'shn_setup_general_dependancies',
	'SELECT_SETUP'=>array(	'PAGE'=>'shn_setup_select_setup',
	'SIMPLE_DB_SETUP'=>array(	'PAGE'=>'shn_setup_simple_dbsetup',
	'SIMPLE_CFG_SETUP'=>array(	'PAGE'=>'shn_setup_simple_config',

The Source Files

The setup has been broken down in to several source files. Each file contains functions for a specific functionality. The files are as follows.

  • - The setup controller and the function callback definitions.
  • - Action functions
  • - Action implementations
  • - Page generation functions
  • - Validation functions
  • - Utility functions

QR Code
QR Code dev:saws (generated for current page)