Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Setup errorai

Parašė viliusss123· 2012 Sau. 27 14:01:27
#1

Ka daryt jei ismeta pilna erroru kai atidaro setup.php faila? visu nenukopinsiu bet cia keletas:


\n".$check_display."\n
 
 
\n"; if ($write_check) { echo $locale['021']."\n"; echo "\n\n\n\n"; echo "\n"; echo "\n"; echo "\n"; } else { echo $locale['022']."\n"; echo "\n\n\n\n"; echo "\n"; echo "\n"; echo "\n"; } } if (isset($_POST['step']) && $_POST['step'] == "3") { function createRandomPrefix ($length = 5) { $chars = array("abcdefghijklmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ", "123456789"); $count = array((strlen($chars[0]) - 1), (strlen($chars[1]) - 1)); $prefix = ""; for ($i = 0; $i < $length; $i++) { $type = mt_rand(0, 1); $prefix .= substr($chars[$type], mt_rand(0, $count[$type]), 1); } return $prefix; } $db_prefix = "fusion".createRandomPrefix()."_"; $cookie_prefix = "fusion".createRandomPrefix()."_"; $db_host = (isset($_POST['db_host']) ? stripinput(trim($_POST['db_host'])) : "localhost"); $db_user = (isset($_POST['db_user']) ? stripinput(trim($_POST['db_user'])) : ""); $db_name = (isset($_POST['db_name']) ? stripinput(trim($_POST['db_name'])) : ""); $db_prefix = (isset($_POST['db_prefix']) ? stripinput(trim($_POST['db_prefix'])) : $db_prefix); $cookie_prefix = (isset($_POST['cookie_prefix']) ? stripinput(trim($_POST['cookie_prefix'])) : $cookie_prefix); $db_error = (isset($_POST['db_error']) && isnum($_POST['db_error']) ? $_POST['db_error'] : "0"); $field_class = array("", "", "", "", ""); if ($db_error > "0") { $field_class[2] = " tbl-error"; if ($db_error == 1) { $field_class[1] = " tbl-error"; $field_class[2] = " tbl-error"; } elseif ($db_error == 2) { $field_class[3] = " tbl-error"; } elseif ($db_error == 3) { $field_class[4] = " tbl-error"; } elseif ($db_error == 7) { if ($db_host == "") { $field_class[0] = " tbl-error"; } if ($db_user == "") { $field_class[1] = " tbl-error"; } if ($db_name == "") { $field_class[3] = " tbl-error"; } if ($db_prefix == "") { $field_class[4] = " tbl-error"; } } } echo $locale['030']."
 
\n"; echo "\n\n"; echo "\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "\n\n"; echo "
".$locale['031']."	
".$locale['032']."	
".$locale['033']."	
".$locale['034']."	
".$locale['035']."	
".$locale['036']."	
\n"; echo "\n\n\n\n"; echo "\n"; echo "\n"; echo "\n"; } if (isset($_POST['step']) && $_POST['step'] == "4") { $db_host = (isset($_POST['db_host']) ? stripinput(trim($_POST['db_host'])) : ""); $db_user = (isset($_POST['db_user']) ? stripinput(trim($_POST['db_user'])) : ""); $db_pass = (isset($_POST['db_pass']) ? stripinput(trim($_POST['db_pass'])) : ""); $db_name = (isset($_POST['db_name']) ? stripinput(trim($_POST['db_name'])) : ""); $db_prefix = (isset($_POST['db_prefix']) ? stripinput(trim($_POST['db_prefix'])) : ""); $cookie_prefix = (isset($_POST['cookie_prefix']) ? stripinput(trim($_POST['cookie_prefix'])) : "fusion_"); if ($db_prefix != "") { $db_prefix_last = $db_prefix[strlen($db_prefix)-1]; if ($db_prefix_last != "_") { $db_prefix = $db_prefix."_"; } } if ($cookie_prefix != "") { $cookie_prefix_last = $cookie_prefix[strlen($cookie_prefix)-1]; if ($cookie_prefix_last != "_") { $cookie_prefix = $cookie_prefix."_"; } } if ($db_host != "" && $db_user != "" && $db_name != "" && $db_prefix != "") { $db_connect = @mysql_connect($db_host, $db_user, $db_pass); if ($db_connect) { $db_select = @mysql_select_db($db_name); if ($db_select) { if (dbrows(dbquery("SHOW TABLES LIKE '$db_prefix%'")) == "0") { $table_name = uniqid($db_prefix, false); $can_write = true; $result = dbquery("CREATE TABLE ".$table_name." (test_field VARCHAR(10) NOT NULL) ENGINE=MYISAM;"); if (!$result) { $can_write = false; } $result = dbquery("DROP TABLE ".$table_name); if (!$result) { $can_write = false; } if ($can_write) { $config = ""; $temp = fopen("config.php","w"); if (fwrite($temp, $config)) { fclose($temp); $fail = false; $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."admin"); $result = dbquery("CREATE TABLE ".$db_prefix."admin ( admin_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, admin_rights CHAR(4) NOT NULL DEFAULT '', admin_image VARCHAR(50) NOT NULL DEFAULT '', admin_title VARCHAR(50) NOT NULL DEFAULT '', admin_link VARCHAR(100) NOT NULL DEFAULT 'reserved', admin_page TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', PRIMARY KEY (admin_id) ) ENGINE=MYISAM;"); if (!$result) { $fail = true; } $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."admin_resetlog"); $result = dbquery("CREATE TABLE ".$db_prefix."admin_resetlog ( reset_id mediumint(8) unsigned NOT NULL auto_increment, reset_admin_id mediumint(8) unsigned NOT NULL default '1', reset_timestamp int(10) unsigned NOT NULL default '0', reset_sucess text NOT NULL, reset_failed text NOT NULL, reset_admins varchar(8) NOT NULL default '0', reset_reason varchar(255) NOT NULL, PRIMARY KEY (reset_id) ) ENGINE=MYISAM;"); if (!$result) { $fail = true; } $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."articles"); $result = dbquery("CREATE TABLE ".$db_prefix."articles ( article_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, article_cat MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', article_subject VARCHAR(200) NOT NULL DEFAULT '', article_snippet TEXT NOT NULL, article_article TEXT NOT NULL, article_draft TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', article_breaks CHAR(1) NOT NULL DEFAULT '', article_name MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '1', article_datestamp INT(10) UNSIGNED NOT NULL DEFAULT '0', article_reads MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0', article_allow_comments TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', article_allow_ratings TINYINT(1) UNSIGNED NOT NULL DEFAULT '1', PRIMARY KEY (article_id), KEY article_cat (article_cat), KEY article_datestamp (article_datestamp), KEY article_reads (article_reads) ) ENGINE=MYISAM;"); if (!$result) { $fail = true; } $result = dbquery("DROP TABLE IF EXISTS ".$db_prefix."article_cats"); $result = dbquery("CREATE TABLE ".$db_prefix."article_cats ( article_cat_id MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT, article_cat_name VARCHAR(100) NOT NULL DEFAULT '', article_cat_description VARCHAR(200) NOT NULL DEFAULT '', article_cat_sorting VARCHAR(50) NOT NULL DEFAULT 'article_subject ASC',