Installation
- >= _trst() ?>install_step_1= _trend() ?>
- >= _trst() ?>install_step_2= _trend() ?>
- >= _trst() ?>install_step_3= _trend() ?>
- >= _trst() ?>install_step_4= _trend() ?>
- >= _trst() ?>install_step_5= _trend() ?>
- >= _trst() ?>install_step_6= _trend() ?>
- PHP < 5.4 () found, short_open_tag needs to be enabled: OK' : 'Fail'); ?>
- PHP >= 5.4 () found, short_open_tag is always enabled: OK
- magic_quotes_gpc should be disabled: OK' : 'Performance problem'); ?>
- magic_quotes_runtime should be disabled: OK' : 'Performance problem'); ?>
- file_uploads should be enabled: OK' : 'Fail'); ?>
- register_globals should be disabled: OK' : 'Security risk!'); ?>
- pcre: OK' : 'Fail'); ?>
- SimpleXML: OK' : 'Fail'); ?>
- SPL: OK' : 'Fail'); ?>
checking system config:
-
missing syscfg!
go back - syscfg found and loaded
- ERROR: No security system key defined! Define $cfg['syskey'] in your config file!
- ERROR: No security system key defined! Define $cfg['syskey'] in your config file!
= _trst() ?>install_step_1_next= _trend() ?>
- = _trst() ?>install_check_dbsettings= _trend() ?>
-
= _trst() ?>install_check_dbsettings_ok= _trend() ?>
= _trst() ?>install_used_db= _trendv($db->getDatabase()) ?>
-
= _trst() ?>install_check_dbsettings_ok= _trend() ?>
- = _trst() ?>install_systable_found= _trendv(MCMS) ?>
- = _trst() ?>install_table_defined= _trendv(array($tableInfo->getName(),$tableInfo->getColumnCount())) ?>
tableExists($tableInfo->getName())) {
?>
= _trst() ?>install_table_exists= _trend() ?>
- = _trst() ?>install_table_defined= _trendv(array($tableInfo->getName(),$tableInfo->getColumnCount())) ?>
tableExists($tableInfo->getName())) {
?>
- = _trst() ?>install_systable_missing= _trendv(MCMS) ?>
= _trst() ?>install_step_2_next= _trend() ?>
\n"; try { $db = DB::newInstance($cfg['db']['dsn'],$cfg['db']['user'],$cfg['db']['passwd']); if (file_exists($systablefile)) { $tablesdef = simplexml_load_file($systablefile); echo '- ';
$tables = array();
foreach ($tablesdef as $tabledef) {
$tableInfo = TableInfo::fromXML($tabledef);
$tables[] = $tableInfo;
}
$tables = array_reverse($tables);
foreach ($tables as $tableInfo) {
if ($db->tableExists($tableInfo->getName())) {
echo '
- ';
try {
echo _trv('install_preremove_table',$tableInfo->getName())." ";
$db->dropTable($tableInfo->getName());
echo " OK
"; } catch (SQLException $e) { echo " error!
".$e->getMessage()."
".$e->getQuery().'
'; } echo ' ';
}
}
$tables = array_reverse($tables);
foreach ($tables as $tableInfo) {
echo ' - ';
echo _trv('install_create_table',$tableInfo->getName())." ";
try {
$db->createTable($tableInfo);
echo " OK
"; } catch (SQLException $e) { echo " error!
".$e->getMessage()."
".$e->getQuery().'
'; } echo ' ';
}
echo '

\n"; $valid = false; } } catch (DBException $e) { echo "- error: ".$e->getMessage(); $valid=false; } if ($valid) echo '
'._tr('install_step_3_next').'
'; else echo ''; break; case 4: ?> \n"; echo '- ';
foreach (array('websites','websitesettings','accounts','accountsettings') as $table) {
echo "
- {$table} "; $db->table($table)->delete(array()); } echo '
\n"; echo ' websites
'; $data = array( 'parent_id' => 0, 'domain' => '*', 'online' => 'online' ); $db->table('websites')->insert($data); $siteId = $db->getInsertId(); echo _trv('install_generated_site_id',$siteId)."
\n"; echo ' websitesettings
'; $data = array( 'site_id' => $siteId, 'instance' => '', 'key' => 'title', 'value' => $_POST['pagename'] ); $db->table('websitesettings')->insert($data); $data = array( 'site_id' => $siteId, 'instance' => '', 'key' => 'layout', 'value' => 'default' ); $db->table('websitesettings')->insert($data); $data = array( 'site_id' => $siteId, 'instance' => '', 'key' => 'startinstance', 'value' => 'home' ); $db->table('websitesettings')->insert($data); $data = array( 'site_id' => $siteId, 'instance' => '', 'key' => 'defaultlang', 'value' => trim($_POST['defaultlang']) ); $db->table('websitesettings')->insert($data); $data = array( 'site_id' => $siteId, 'instance' => '', 'key' => 'lang', 'value' => trim($_POST['defaultlang']) ); $db->table('websitesettings')->insert($data); echo ' accounts
'; $data = array( 'seed' => rand(1000,100000), 'login' => trim($_POST['alogin']), 'password' => sha1(trim($_POST['apasswd'])), 'email' => trim($_POST['aemail']), 'authtoken' => sha1($_POST['apasswd'].time()), 'state' => 0, 'masteradmin' => true ); $db->table('accounts')->insert($data); if (isset($_REQUEST['createhome']) && $_REQUEST['createhome'] == 'y') { $db->table('moduleinstances')->delete(array('site_id' => $siteId,'instance' => 'home')); $data = array( 'site_id' => $siteId, 'base_menu_id' => 0, 'instance' => 'home', 'module' => 'mcms.static', 'visible' => 'all', 'publish_start' => NULL, 'publish_end' => NULL ); $db->table('moduleinstances')->insert($data); } echo ''; } catch (DBException $e) { echo "- error: ".$e->getMessage(); echo ''; } break; case '6': echo '
'._tr('install_finish_i1').'
'; echo ''._tr('install_finish_i2').'
'; echo ''._tr('install_finish_i3').'
'; break; } ?>