MySQL host:
" size="30" style="width:250px" />
default: localhost
DB user:
" size="30" />
DB password:
" size="30" />
DB database:
" size="30" maxlength="255" />
you have to create it before setup!!!
DB table prefix:
default: none (""), if filled
in it will be prefix +_
recommend setting is to enable it
4. Charset & MySQL (v) collation
settings
Charset (recommend: UTF8):
$value) {
list(, $_lang_charset) = explode('-', $value[1], 2);
list(, $_lang_en) = explode('|', $value[0]);
if($phpwcms['db_version'] < 40100 && !in_array($mysql_charset_map[$_lang_charset], $_availableCharsets)) continue;
echo '';
echo empty($value[3]) ? '' : $value[3].' - ';
echo ucfirst($_lang_en);
echo ' ['.$_lang_charset;
if(!empty($mysql_charset_map[$_lang_charset])) {
echo ' / '.$mysql_charset_map[$_lang_charset];
}
echo ']';
echo " \n";
}
?>
40100) {
$_collation = array();
$_collation_selected = false;
echo ' ';
// make db connect
if(empty($db)) {
$db = @mysql_connect($phpwcms["db_host"], $phpwcms["db_user"], $phpwcms["db_pass"]);
@mysql_select_db($phpwcms["db_table"], $db);
}
if($result = mysql_query("SHOW COLLATION", $db)) {
while($row = mysql_fetch_assoc($result)) {
if(in_array($row['Charset'], $mysql_charset_map)) {
if($phpwcms['db_collation']==$row['Collation']) {
$_collation_selected = true;
$_collation[ $row['Charset'] ][ $row['Collation'] ] = true;
} else {
$_collation[ $row['Charset'] ][ $row['Collation'] ] = false;
}
}
}
ksort($_collation);
}
// warn again
if(isset($_collation_warning) && $_collation_warning === true) {
echo ' '.errorWarning('Proof collation again!').' ';
$_SESSION['admin_set'] = false;
}
?>
MySQL Collation (recommend: utf8_general_ci):
$value) {
ksort($value);
echo ' '. "\n";
foreach($value as $colkey => $status) {
echo ' '.$colkey.' '. "\n";
}
echo ' ' . "\n";
}
?>
5. Default phpwcms database
schema
';
echo errorWarning('phpwcms tables still exists in choosen database. Rename table prefix might help!');
echo " \n";
$_SESSION['admin_set'] = false;
}
if(isset($db_create_err) && count($db_create_err)) {
echo ' ';
echo errorWarning('Errors while creating initial phpwcms tables. Solve it manually:'.html_specialchars(implode(";\n\n", $db_create_err).';').' ');
echo "
\n";
$_SESSION['admin_set'] = false;
$sql_data = false;
$db_sql = false;
} elseif(isset($db_create_err) || !empty($db_no_create)) {
// OK fine - initial tables were created without error
$_db_prepend = ($phpwcms["db_prepend"] ? $phpwcms["db_prepend"].'_' : '');
$check = _dbQuery("SHOW TABLES LIKE '".$_db_prepend."phpwcms_%'");
if($check && count($check)) {
$sql_data = false;
$db_sql = false;
$db_fine = true;
?>
Fine! All initial phpwcms tables were created or still exists.
';
echo errorWarning('No phpwcms database table exists. Check before you continue!');
echo ' ';
echo " \n";
}
}
if(empty($db_fine)) {
// show info
?>
$value) {
$value = trim($value);
if(empty($value)) {
unset($sql_data[$key]);
continue;
}
$value = html_specialchars($value);
$value = str_replace(' ', ' ', $value);
$value = nl2br($value);
$sql_data[$key] = ''.$value;
if($phpwcms['db_version'] > 40100 && strpos(strtoupper(trim($value)), 'INSERT') !== 0) {
$sql_data[$key] .= ' DEFAULT';
$sql_data[$key] .= ' CHARACTER SET '.$phpwcms['db_charset'];
$sql_data[$key] .= ' COLLATE '.$phpwcms['db_collation'];
}
$sql_data[$key] .= ' ;
';
$c++;
}
$sql_data = implode("\n", $sql_data);
echo ' ';
if(empty($_db_prepend_error) && isset($_POST['db_sql_hidden'])) {
echo ' ';
}
echo ' ';
echo '';
echo $sql_data;
echo "
\n";
}
}
// OK now lets create superuser
if(!empty($_SESSION['admin_set'])) {
?>
6. Superuser settings
Name:
" size="30" />
default: Webmaster
Admin login:
" size="30" />
default: admin
';
echo errorWarning('Invalid password! Password is case senitive, empty password not allowed.');
echo " \n";
}
?>
Admin password:
default: phpwcms
Repeat password:
Admin email:
" size="30" />
is used site wide
';
if(!empty($create_user)) {
// update
echo ' ';
echo 'Done! Account for user '.html_specialchars($phpwcms['admin_user']).' was created.';
echo ' ';
}
if(!empty($update_user)) {
// update
echo ' ';
echo 'Done! Account of user '.html_specialchars($phpwcms['admin_user']).' was updated.';
echo ' ';
}
if($user_check === false) {
// db error
echo errorWarning('There is a database problem!');
echo 'Account for user '.html_specialchars($phpwcms['admin_user']).' was not created or updated. Click continue to try again.
';
$_SESSION['admin_save'] = false;
}
echo ' ';
}
}
?>