示例#1
0
    function install(&$Page, $fields)
    {
        $db = new MySQL();
        $db->connect($fields['database']['host'], $fields['database']['username'], $fields['database']['password'], $fields['database']['port']);
        if ($db->isConnected()) {
            $tables = $db->fetch("SHOW TABLES FROM `" . $fields['database']['name'] . "` LIKE '" . mysql_escape_string($fields['database']['prefix']) . "%'");
        }
        ## Invalid path
        if (!@is_dir(rtrim($fields['docroot'], '/') . '/symphony')) {
            $Page->log->pushToLog("Configuration - Bad Document Root Specified: " . $fields['docroot'], SYM_LOG_NOTICE, true);
            define("kENVIRONMENT_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'no-symphony-dir');
            }
        } elseif (is_file(rtrim($fields['docroot'], '/') . '/.htaccess')) {
            $Page->log->pushToLog("Configuration - Existing '.htaccess' file found: " . $fields['docroot'] . '/.htaccess', SYM_LOG_NOTICE, true);
            define("kENVIRONMENT_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'existing-htaccess');
            }
        } elseif (is_dir(rtrim($fields['docroot'], '/') . '/workspace') && !is_writable(rtrim($fields['docroot'], '/') . '/workspace')) {
            $Page->log->pushToLog("Configuration - Workspace folder not writable: " . $fields['docroot'] . '/workspace', SYM_LOG_NOTICE, true);
            define("kENVIRONMENT_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'no-write-permission-workspace');
            }
        } elseif (!is_writable(rtrim($fields['docroot'], '/'))) {
            $Page->log->pushToLog("Configuration - Root folder not writable: " . $fields['docroot'], SYM_LOG_NOTICE, true);
            define("kENVIRONMENT_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'no-write-permission-root');
            }
        } elseif (!$db->isConnected()) {
            $Page->log->pushToLog("Configuration - Could not establish database connection", SYM_LOG_NOTICE, true);
            define("kDATABASE_CONNECTION_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'no-database-connection');
            }
        } elseif (!$db->select($fields['database']['name'])) {
            $Page->log->pushToLog("Configuration - Database '" . $fields['database']['name'] . "' Not Found", SYM_LOG_NOTICE, true);
            define("kDATABASE_CONNECTION_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'no-database-connection');
            }
        } elseif (is_array($tables) && !empty($tables)) {
            $Page->log->pushToLog("Configuration - Database table prefix clash with '" . $fields['database']['name'] . "'", SYM_LOG_NOTICE, true);
            define("kDATABASE_PREFIX_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'database-table-clash');
            }
        } elseif (trim($fields['user']['username']) == '') {
            $Page->log->pushToLog("Configuration - No username entered.", SYM_LOG_NOTICE, true);
            define("kUSER_USERNAME_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'user-no-username');
            }
        } elseif (trim($fields['user']['password']) == '') {
            $Page->log->pushToLog("Configuration - No password entered.", SYM_LOG_NOTICE, true);
            define("kUSER_PASSWORD_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'user-no-password');
            }
        } elseif ($fields['user']['password'] != $fields['user']['confirm-password']) {
            $Page->log->pushToLog("Configuration - Passwords did not match.", SYM_LOG_NOTICE, true);
            define("kUSER_PASSWORD_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'user-password-mismatch');
            }
        } elseif (trim($fields['user']['firstname']) == '' || trim($fields['user']['lastname']) == '') {
            $Page->log->pushToLog("Configuration - Did not enter First and Last names.", SYM_LOG_NOTICE, true);
            define("kUSER_NAME_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'user-no-name');
            }
        } elseif (!ereg('^[a-zA-Z0-9_\\.\\-]+@[a-zA-Z0-9\\-]+\\.[a-zA-Z0-9\\-\\.]+$', $fields['user']['email'])) {
            $Page->log->pushToLog("Configuration - Invalid email address supplied.", SYM_LOG_NOTICE, true);
            define("kUSER_EMAIL_WARNING", true);
            if (!defined("ERROR")) {
                define("ERROR", 'user-invalid-email');
            }
        } else {
            $config = $fields;
            $kDOCROOT = rtrim($config['docroot'], '/');
            $database = array_map("trim", $fields['database']);
            if (!isset($database['host']) || $database['host'] == "") {
                $database['host'] = "localhost";
            }
            if (!isset($database['port']) || $database['port'] == "") {
                $database['port'] = "3306";
            }
            if (!isset($database['prefix']) || $database['prefix'] == "") {
                $database['prefix'] = "sym_";
            }
            $install_log = $Page->log;
            $start = time();
            $install_log->writeToLog(CRLF . '============================================', true);
            $install_log->writeToLog('INSTALLATION PROCESS STARTED (' . date("d.m.y H:i:s") . ')', true);
            $install_log->writeToLog('============================================', true);
            $db = new MySQL();
            $install_log->pushToLog("MYSQL: Establishing Connection...", SYM_LOG_NOTICE, true, false);
            $db = new MySQL();
            if (!$db->connect($database['host'], $database['username'], $database['password'], $database['port'])) {
                define("_INSTALL_ERRORS_", "There was a problem while trying to establish a connection to the MySQL server. Please check your settings.");
                $install_log->pushToLog("Failed", SYM_LOG_NOTICE, true, true, true);
                installResult($Page, $install_log, $start);
            } else {
                $install_log->pushToLog("Done", SYM_LOG_NOTICE, true, true, true);
            }
            $install_log->pushToLog("MYSQL: Selecting Database '" . $database['name'] . "'...", SYM_LOG_NOTICE, true, false);
            if (!$db->select($database['name'])) {
                define("_INSTALL_ERRORS_", "Could not connect to specified database. Please check your settings.");
                $install_log->pushToLog("Failed", SYM_LOG_NOTICE, true, true, true);
                installResult($Page, $install_log, $start);
            } else {
                $install_log->pushToLog("Done", SYM_LOG_NOTICE, true, true, true);
            }
            $db->setPrefix($database['prefix']);
            $install_log->pushToLog("MYSQL: Creating Tables...", SYM_LOG_NOTICE, true, false);
            $error = NULL;
            if (!fireSql($db, getTableSchema(), $error, $config['database']['high-compatibility'] == 'yes' ? 'high' : 'normal')) {
                define("_INSTALL_ERRORS_", "There was an error while trying to create tables in the database. MySQL returned: {$error}");
                $install_log->pushToLog("Failed", SYM_LOG_ERROR, true, true, true);
                installResult($Page, $install_log, $start);
            } else {
                $install_log->pushToLog("Done", SYM_LOG_NOTICE, true, true, true);
            }
            $author_sql = "INSERT INTO `tbl_authors` " . "(username, password, firstname, lastname, email, superuser, owner, textformat) " . "VALUES (" . "'" . $config['user']['username'] . "', " . "'" . md5($config['user']['password']) . "', " . "'" . $config['user']['firstname'] . "', " . "'" . $config['user']['lastname'] . "', " . "'" . $config['user']['email'] . "', " . "'1', '1', 'simplehtml' )";
            $error = NULL;
            $db->query($author_sql, $error);
            if (!empty($error)) {
                define("_INSTALL_ERRORS_", "There was an error while trying create the default author. MySQL returned: {$error}");
                $install_log->pushToLog("Failed", SYM_LOG_ERROR, true, true, true);
                installResult($Page, $install_log, $start);
            } else {
                $install_log->pushToLog("Done", SYM_LOG_NOTICE, true, true, true);
            }
            $conf = array();
            $conf['define'] = array('DOCROOT' => $kDOCROOT, 'DOMAIN' => str_replace("http://", "", _INSTALL_DOMAIN_));
            $conf['require'] = array($kDOCROOT . '/symphony/lib/boot/bundle.php');
            $conf['settings']['admin']['max_upload_size'] = '5242880';
            $conf['settings']['admin']['handle_length'] = '50';
            $conf['settings']['filemanager']['filetype_restriction'] = 'bmp, jpg, gif, png, doc, rtf, pdf, zip';
            $conf['settings']['filemanager']['enabled'] = 'yes';
            $conf['settings']['filemanager']['log_all_upload_attempts'] = 'yes';
            $conf['settings']['symphony']['build'] = kBUILD;
            $conf['settings']['symphony']['acct_server'] = kSUPPORT_SERVER;
            $conf['settings']['symphony']['update'] = '5';
            $conf['settings']['symphony']['lastupdatecheck'] = time();
            $conf['settings']['symphony']['prune_logs'] = '1';
            $conf['settings']['symphony']['allow_page_subscription'] = '1';
            $conf['settings']['symphony']['strict_section_field_validation'] = '1';
            $conf['settings']['symphony']['allow_primary_field_handles_to_change'] = '1';
            $conf['settings']['symphony']['pagination_maximum_rows'] = '17';
            $conf['settings']['symphony']['cookie_prefix'] = 'sym_';
            $conf['settings']['xsl']['exclude-parameter-declarations'] = 'off';
            if ($config['theme'] == 'yes') {
                $conf['settings']['general']['sitename'] = 'Symphony Web Publishing System';
            } else {
                $conf['settings']['general']['sitename'] = 'Website Name';
            }
            $conf['settings']['general']['useragent'] = 'Symphony/' . kBUILD;
            $conf['settings']['image']['cache'] = '1';
            $conf['settings']['image']['quality'] = '70';
            $conf['settings']['file']['extend_timeout'] = 'off';
            $conf['settings']['file']['write_mode'] = $config['permission']['file'];
            $conf['settings']['directory']['write_mode'] = $config['permission']['directory'];
            $conf['settings']['database']['driver'] = 'MySQL';
            $conf['settings']['database']['host'] = $database['host'];
            $conf['settings']['database']['port'] = $database['port'];
            $conf['settings']['database']['user'] = $database['username'];
            $conf['settings']['database']['password'] = $database['password'];
            $conf['settings']['database']['db'] = $database['name'];
            $conf['settings']['database']['tbl_prefix'] = $database['prefix'];
            $conf['settings']['database']['character_set'] = 'utf8';
            $conf['settings']['database']['character_encoding'] = 'utf8';
            $conf['settings']['database']['runtime_character_set_alter'] = '0';
            $conf['settings']['public']['status'] = 'online';
            $conf['settings']['public']['caching'] = 'on';
            $conf['settings']['public']['excerpt-length'] = '100';
            $conf['settings']['region']['time_zone'] = '10';
            $conf['settings']['region']['time_format'] = 'g:i a';
            $conf['settings']['region']['date_format'] = 'j F Y';
            $conf['settings']['region']['dst'] = 'no';
            $conf['settings']['workspace']['config_checksum'] = '';
            $conf['settings']['commenting']['allow-by-default'] = 'on';
            $conf['settings']['commenting']['email-notify'] = 'off';
            $conf['settings']['commenting']['allow-duplicates'] = 'off';
            $conf['settings']['commenting']['maximum-allowed-links'] = '3';
            $conf['settings']['commenting']['banned-words'] = '';
            $conf['settings']['commenting']['banned-words-replacement'] = '*****';
            $conf['settings']['commenting']['hide-spam-flagged'] = 'on';
            $conf['settings']['commenting']['formatting-type'] = 'simplehtml';
            $conf['settings']['commenting']['add-nofollow'] = 'off';
            $conf['settings']['commenting']['convert-urls'] = 'off';
            $conf['settings']['commenting']['check-referer'] = 'on';
            $conf['settings']['commenting']['nuke-spam'] = 'on';
            $conf['settings']['commenting']['ip-blacklist'] = '';
            ## Create Manifest directory structure
            #
            $install_log->pushToLog("WRITING: Creating 'manifest' folder (/manifest)", SYM_LOG_NOTICE, true, true);
            if (!GeneralExtended::realiseDirectory($kDOCROOT . '/manifest', $conf['settings']['directory']['write_mode'])) {
                define("_INSTALL_ERRORS_", "Could not create 'manifest' directory. Check permission on the root folder.");
                $install_log->pushToLog("ERROR: Creation of 'manifest' folder failed.", SYM_LOG_ERROR, true, true);
                installResult($Page, $install_log, $start);
                return;
            }
            $install_log->pushToLog("WRITING: Creating 'logs' folder (/manifest/logs)", SYM_LOG_NOTICE, true, true);
            if (!GeneralExtended::realiseDirectory($kDOCROOT . '/manifest/logs', $conf['settings']['directory']['write_mode'])) {
                define("_INSTALL_ERRORS_", "Could not create 'logs' directory. Check permission on /manifest.");
                $install_log->pushToLog("ERROR: Creation of 'logs' folder failed.", SYM_LOG_ERROR, true, true);
                installResult($Page, $install_log, $start);
                return;
            }
            $install_log->pushToLog("WRITING: Creating 'cache' folder (/manifest/cache)", SYM_LOG_NOTICE, true, true);
            if (!GeneralExtended::realiseDirectory($kDOCROOT . '/manifest/cache', $conf['settings']['directory']['write_mode'])) {
                define("_INSTALL_ERRORS_", "Could not create 'cache' directory. Check permission on /manifest.");
                $install_log->pushToLog("ERROR: Creation of 'cache' folder failed.", SYM_LOG_ERROR, true, true);
                installResult($Page, $install_log, $start);
                return;
            }
            $install_log->pushToLog("WRITING: Creating 'tmp' folder (/manifest/tmp)", SYM_LOG_NOTICE, true, true);
            if (!GeneralExtended::realiseDirectory($kDOCROOT . '/manifest/tmp', $conf['settings']['directory']['write_mode'])) {
                define("_INSTALL_ERRORS_", "Could not create 'tmp' directory. Check permission on /manifest.");
                $install_log->pushToLog("ERROR: Creation of 'tmp' folder failed.", SYM_LOG_ERROR, true, true);
                installResult($Page, $install_log, $start);
                return;
            }
            $install_log->pushToLog("WRITING: Configuration File", SYM_LOG_NOTICE, true, true);
            if (!writeConfig($kDOCROOT . "/manifest/", $conf, $conf['settings']['file']['write_mode'])) {
                define("_INSTALL_ERRORS_", "Could not write config file. Check permission on /manifest.");
                $install_log->pushToLog("ERROR: Writing Configuration File Failed", SYM_LOG_ERROR, true, true);
                installResult($Page, $install_log, $start);
            }
            $rewrite_base = dirname($_SERVER['PHP_SELF']);
            $rewrite_base = trim($rewrite_base, '/');
            if ($rewrite_base != "") {
                $rewrite_base .= '/';
            }
            $htaccess = '
### Symphony 1.7 - Do not edit ###

<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteBase /' . $rewrite_base . '

	### DO NOT APPLY RULES WHEN REQUESTING "favicon.ico"
	RewriteCond %{REQUEST_FILENAME} favicon.ico [NC]
	RewriteRule .* - [S=14]

	### IMAGE RULES
	RewriteRule ^image/([0-9]+)\\/([0-9]+)\\/(0|1)\\/([a-fA-f0-9]{1,6})\\/external/([\\W\\w]+)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=$1&height=$2&crop=$3&bg=$4&_f=$5.$6&external=true [L]
	RewriteRule ^image/external/([\\W\\w]+)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=0&height=0&crop=0&bg=0&_f=$1.$2&external=true [L]

	RewriteRule ^image/([0-9]+)\\/([0-9]+)\\/(0|1)\\/([a-fA-f0-9]{1,6})\\/external/(.*)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=$1&height=$2&crop=$3&bg=$4&_f=$5.$6&external=true [L]
	RewriteRule ^image/external/(.*)\\.(jpg|gif|jpeg|png|bmp)$  /' . $rewrite_base . 'symphony/image.php?width=0&height=0&crop=0&bg=0&_f=$1.$2&external=true [L]

	RewriteRule ^image/([0-9]+)\\/([0-9]+)\\/(0|1)\\/([a-fA-f0-9]{1,6})\\/([\\W\\w]+)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=$1&height=$2&crop=$3&bg=$4&_f=$5.$6 	[L]
	RewriteRule ^image/([\\W\\w]+)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=0&height=0&crop=0&bg=0&_f=$1.$2 	[L]

	RewriteRule ^image/([0-9]+)\\/([0-9]+)\\/(0|1)\\/([a-fA-f0-9]{1,6})\\/(.*)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=$1&height=$2&crop=$3&bg=$4&_f=$5.$6 	[L]
	RewriteRule ^image/(.*)\\.(jpg|gif|jpeg|png|bmp)$   /' . $rewrite_base . 'symphony/image.php?width=0&height=0&crop=0&bg=0&_f=$1.$2 	[L]

	### CHECK FOR TRAILING SLASH - Will ignore files
	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_URI} !/' . trim($rewrite_base, '/') . '$
	RewriteCond %{REQUEST_URI} !(.*)/$
	RewriteRule ^(.*)$ /' . $rewrite_base . '$1/ [L,R=301]

	### MAIN REWRITE - This will ignore directories
	RewriteCond %{REQUEST_FILENAME} !-d
	RewriteRule ^(.*)\\/$ /' . $rewrite_base . 'index.php?page=$1&%{QUERY_STRING}	[L]

</IfModule>

DirectoryIndex index.php
IndexIgnore *

######
';
            $install_log->pushToLog("CONFIGURING: Frontend", SYM_LOG_NOTICE, true, true);
            if (!GeneralExtended::writeFile($kDOCROOT . "/.htaccess", $htaccess, $conf['settings']['file']['write_mode'])) {
                define("_INSTALL_ERRORS_", "Could not write .htaccess file. Check permission on " . $kDOCROOT);
                $install_log->pushToLog("ERROR: Writing .htaccess File Failed", SYM_LOG_ERROR, true, true);
                installResult($Page, $install_log, $start);
            }
            if (@is_file($fields['docroot'] . '/workspace/workspace.conf')) {
                $install_log->pushToLog("CONFIGURING: Importing Workspace", SYM_LOG_NOTICE, true, false);
                if (!fireSql($db, file_get_contents($fields['docroot'] . '/workspace/workspace.conf') . getDefaultTableData(), $error, $config['database']['high-compatibility'] == 'yes' ? 'high' : 'normal')) {
                    define("_INSTALL_ERRORS_", "There was an error while trying to import the workspace data. MySQL returned: {$error}");
                    $install_log->pushToLog("Failed", SYM_LOG_ERROR, true, true, true);
                    installResult($Page, $install_log, $start);
                } else {
                    $install_log->pushToLog("Done", SYM_LOG_NOTICE, true, true, true);
                }
            } elseif (@(!is_dir($fields['docroot'] . '/workspace'))) {
                ### Create the workspace folder structure
                #
                $install_log->pushToLog("WRITING: Creating 'workspace' folder (/workspace)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'data-sources' folder (/workspace/data-sources)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/data-sources', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/data-sources' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/data-sources' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'events' folder (/workspace/events)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/events', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/events' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/events' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'masters' folder (/workspace/masters)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/masters', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/masters' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/masters' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'pages' folder (/workspace/pages)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/pages', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/pages' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/pages' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'text-formatters' folder (/workspace/text-formatters)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/text-formatters', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/text-formatters' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/text-formatters' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'upload' folder (/workspace/upload)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/upload', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/upload' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/upload' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
                $install_log->pushToLog("WRITING: Creating 'utilities' folder (/workspace/utilities)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/workspace/utilities', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'workspace/utilities' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'workspace/utilities' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
            }
            if (@(!is_dir($fields['docroot'] . '/campfire'))) {
                $install_log->pushToLog("WRITING: Creating 'campfire' folder (/campfire)", SYM_LOG_NOTICE, true, true);
                if (!GeneralExtended::realiseDirectory($kDOCROOT . '/campfire', $conf['settings']['directory']['write_mode'])) {
                    define("_INSTALL_ERRORS_", "Could not create 'campfire' directory. Check permission on the root folder.");
                    $install_log->pushToLog("ERROR: Creation of 'campfire' folder failed.", SYM_LOG_ERROR, true, true);
                    installResult($Page, $install_log, $start);
                    return;
                }
            }
            $install_log->pushToLog("Installation Process Completed In " . max(1, time() - $start) . " sec", SYM_LOG_NOTICE, true);
            installResult($Page, $install_log, $start);
            GeneralExtended::redirect('http://' . rtrim(str_replace('http://', '', _INSTALL_DOMAIN_), '/') . '/symphony/');
        }
    }