Source for file install_database.php
Documentation is available at install_database.php
* assign next step in installation process
$gBitSmarty->assign( 'next_step',$step );
require_once( "get_databases_inc.php" );
// next block checks if there is a config/kernel/config_inc.php and if we can connect through this.
if( isset ( $_REQUEST['submit_db_info'] )) {
if( $gBitDbType == 'sybase' ) {
// avoid database change messages
ini_set( 'sybct.min_server_severity', '11' );
// for Oracle force database name to use one from tnsnames
// this way we avoid further StartTrans errors that was often reported,
if( $gBitDbType == 'oci8po' && empty( $gBitDbName ) ) {
$gBitSmarty->assign( 'error', TRUE );
$gBitSmarty->assign( 'errorMsg', "Please fill Database Name field. If you don't know it and you're using Express Edition it's probably 'XE'. Otherwise check your \"tnsnames.ora\" file to get appropriate one." );
$gBitDb = &ADONewConnection( $gBitDbType );
if( $gBitDb->Connect( $gBitDbHost, $gBitDbUser, $gBitDbPassword, $gBitDbName )) {
// display success page when done
$gBitSmarty->assign( 'next_step',$step + 1 );
// this is where we tell the installer that this is the first install
// if so, clear out session variables
// if we are coming here from the upgrade process, don't change any value
if( isset ( $_SESSION['first_install'] ) && $_SESSION['first_install'] == TRUE && isset ( $_SESSION['upgrade'] ) && $_SESSION['upgrade'] == TRUE ) {
} elseif( !$gBitUser->isAdmin() ) {
$_SESSION['first_install'] = TRUE;
$_SESSION['first_install'] = FALSE;
if( $_SESSION['first_install'] == TRUE ) {
// For MySql only, on first install check if server support
// InnoDB and set a smarty var for template to offer using
// the transaction safe storage engine
$_SESSION['use_innodb'] = FALSE;
$rs = $gBitDb->Execute('SHOW ENGINES');
$row = $rs->GetRowAssoc(false);
$gBitSmarty->assign( 'has_innodb_support',strtoupper( $row['Support'] ) );
$gBitSmarty->assign( 'error', TRUE );
$gBitSmarty->assign( 'errorMsg', $gBitDb->_errorMsg );
|