Discuz不支持PHP5.5以及更高版本的解决方法

PS:转载请注明出处 http://www.ota.hk/

Discuz不支持PHP5.5以及更高版本的解决方法:

多的不解释,直接给出方法,把下面内容中的TYPE改为ENGINE即可
涉及到得文件:
api\db\dbbak.php
*必须*install\data\install.sql
*必须*install\include\install_function.php
source\admincp\admincp_db.php
source\class\table\table_common_remote_port.php
source\class\table\table_forum_optionvalue.php
source\function\function_plugin.php
source\plugin\myrepeats\install.php
source\plugin\qqconnect\install.php
source\plugin\qqconnect\upgrade.php
source\plugin\wechat\install\update.func.php
uc_server\api\dbbak.php
uc_server\control\admin\db.php
uc_server\install\uc.sql

api\db\dbbak.php
[635] return preg_replace(array('/TYPE=HEAP/i', '/TYPE=(\w+)/is'), array("ENGINE=MEMORY DEFAULT CHARSET=$dbcharset", "ENGINE=\\1 DEFAULT CHARSET=$dbcharset"), $sql);
[638] return preg_replace(array('/character set \w+/i', '/collate \w+/i', '/ENGINE=MEMORY/i', '/\s*DEFAULT CHARSET=\w+/is', '/\s*COLLATE=\w+/is', '/ENGINE=(\w+)(.*)/is'), array('', '', 'ENGINE=HEAP', '', '', 'TYPE=\\1\\2'), $sql);

install\data\install.sql
[20] ) TYPE=MyISAM;
[27] ) TYPE=MyISAM;
[35] ) TYPE=MyISAM;
[42] ) TYPE=MyISAM;
[54] ) TYPE=MyISAM;
[121] ) TYPE=MyISAM;
[133] ) TYPE=MyISAM;
[148] ) TYPE=MyISAM;
[156] ) TYPE=MyISAM;
[169] ) TYPE=MyISAM;
[200] ) TYPE=MyISAM;
[210] ) TYPE=MyISAM;
[234] ) TYPE=MyISAM;
[263] ) TYPE=MyISAM;
[275] ) TYPE=MyISAM;
[287] ) TYPE=MyISAM;
[305] ) TYPE=MyISAM;
[318] ) TYPE=MyISAM;
[326] ) TYPE=MyISAM;
[344] ) TYPE=MyISAM;
[359] ) TYPE=MyISAM;
[366] ) TYPE=MyISAM;
[375] ) TYPE=MyISAM;
[397] ) TYPE=MyISAM;
[405] ) TYPE=MyISAM;
[427] ) TYPE=MyISAM;
[450] ) TYPE=MyISAM;
[460] ) TYPE=MyISAM;
[477] ) TYPE=MyISAM;
[485] ) TYPE=MyISAM;
[497] ) TYPE=MyISAM;
[510] ) TYPE=MyISAM;
[521] ) TYPE=MyISAM;
[530] ) TYPE=MyISAM;
[539] ) TYPE=MyISAM;
[551] ) TYPE=MyISAM;
[562] ) TYPE=MyISAM;
[582] ) TYPE=MyISAM;
[606] ) TYPE=MyISAM;
[624] ) TYPE=MyISAM;
[634] ) TYPE=MyISAM;
[645] ) TYPE=MyISAM;
[678] ) TYPE=MyISAM;
[688] ) TYPE=MyISAM;
[705] ) TYPE=MyISAM;
[738] ) TYPE=MyISAM;
[751] ) TYPE=MyISAM;
[766] ) TYPE=MyISAM;
[790] ) TYPE=MyISAM;
[799] ) TYPE=MyISAM;
[808] ) TYPE=MyISAM;
[816] ) TYPE=MyISAM;
[824] ) TYPE=MyISAM;
[831] ) TYPE=MyISAM;
[838] ) TYPE=MyISAM;
[895] ) TYPE=MyISAM;
[917] ) TYPE=MyISAM;
[931] ) TYPE=MyISAM;
[938] ) TYPE=HEAP;
[950] ) TYPE=MyISAM;
[970] ) TYPE=MyISAM;
[984] ) TYPE=MyISAM;
[1004] ) TYPE=MyISAM;
[1018] ) TYPE=MyISAM;
[1038] ) TYPE=MyISAM;
[1054] ) TYPE=MyISAM;
[1066] ) TYPE=MyISAM;
[1091] ) TYPE=MyISAM;
[1100] ) TYPE=MyISAM;
[1107] ) TYPE=MyISAM;
[1117] ) TYPE=MyISAM;
[1134] ) TYPE=MyISAM;
[1149] ) TYPE=MyISAM;
[1158] ) TYPE=HEAP;
[1166] ) TYPE=MyISAM;
[1175] ) TYPE=MyISAM;
[1184] ) TYPE=MyISAM;
[1204] ) TYPE=MyISAM;
[1221] ) TYPE=MyISAM;
[1234] ) TYPE=HEAP;
[1243] ) TYPE=MyISAM;
[1263] ) TYPE=HEAP;
[1270] ) TYPE=MyISAM;
[1282] ) TYPE=MyISAM;
[1289] ) TYPE=MyISAM;
[1326] ) TYPE=MyISAM;
[1334] ) TYPE=MyISAM;
[1344] ) TYPE=MyISAM;
[1354] ) TYPE=MyISAM;
[1363] ) TYPE=MyISAM;
[1373] ) TYPE=MyISAM;
[1382] ) TYPE=MyISAM;
[1407] ) TYPE=MyISAM;
[1421] ) TYPE=MyISAM;
[1430] ) TYPE=MyISAM;
[1439] ) TYPE=MyISAM;
[1451] ) TYPE=MyISAM;
[1460] ) TYPE=MyISAM;
[1483] ) TYPE=MyISAM;
[1598] ) TYPE=MyISAM;
[1606] ) TYPE=HEAP;
[1617] ) TYPE=MyISAM;
[1624] ) TYPE=MyISAM;
[1641] ) TYPE=MyISAM;
[1654] ) TYPE=MyISAM;
[1667] ) TYPE=MyISAM;
[1680] ) TYPE=MyISAM;
[1695] ) TYPE=MyISAM;
[1712] ) TYPE=MyISAM;
[1735] ) TYPE=MyISAM;
[1752] ) TYPE=MyISAM;
[1767] ) TYPE=MyISAM;
[1781] ) TYPE=MyISAM;
[1805] ) TYPE=MyISAM;
[1829] ) TYPE=MyISAM;
[1853] ) TYPE=MyISAM;
[1877] ) TYPE=MyISAM;
[1901] ) TYPE=MyISAM;
[1925] ) TYPE=MyISAM;
[1949] ) TYPE=MyISAM;
[1973] ) TYPE=MyISAM;
[1997] ) TYPE=MyISAM;
[2021] ) TYPE=MyISAM;
[2028] ) TYPE=MyISAM;
[2044] ) TYPE=MyISAM;
[2054] ) TYPE=MyISAM;
[2071] ) TYPE=MyISAM;
[2098] ) TYPE=MyISAM;
[2114] ) TYPE=MyISAM;
[2125] ) TYPE=MyISAM;
[2134] ) TYPE=MyISAM;
[2141] ) TYPE=MyISAM;
[2151] ) TYPE=MyISAM;
[2161] ) TYPE=MyISAM;
[2174] ) TYPE=MyISAM;
[2198] ) TYPE=MyISAM;
[2212] ) TYPE=MyISAM;
[2225] ) TYPE=MyISAM;
[2234] ) TYPE=MyISAM;
[2290] ) TYPE=MyISAM;
[2299] ) TYPE=MyISAM;
[2354] ) TYPE=MyISAM;
[2374] ) TYPE=MyISAM;
[2382] ) TYPE=MyISAM;
[2394] ) TYPE=MyISAM;
[2404] ) TYPE=MyISAM;
[2419] ) TYPE=MyISAM;
[2435] ) TYPE=MyISAM;
[2444] ) TYPE=MyISAM;
[2455] ) TYPE=MyISAM;
[2466] ) TYPE=MyISAM;
[2484] ) TYPE=MyISAM;
[2500] ) TYPE=MyISAM;
[2509] ) TYPE=MyISAM;
[2518] ) TYPE=MyISAM;
[2528] ) TYPE=MyISAM;
[2538] ) TYPE=MyISAM;
[2546] ) TYPE=MyISAM;
[2564] ) TYPE=MyISAM;
[2578] ) TYPE=MyISAM;
[2590] ) TYPE=MyISAM;
[2610] ) TYPE=MyISAM;
[2621] ) TYPE=MyISAM;
[2659] ) TYPE=MyISAM;
[2672] ) TYPE=MyISAM;
[2681] ) TYPE=MyISAM;
[2687] ) TYPE=MyISAM;
[2697] ) TYPE=MyISAM;
[2718] ) TYPE=MyISAM;
[2732] ) TYPE=MyISAM;
[2742] ) TYPE=MyISAM;
[2750] ) TYPE=MyISAM;
[2764] ) TYPE=MyISAM;
[2774] ) TYPE=MyISAM;
[2785] ) TYPE=MyISAM;
[2800] ) TYPE=MyISAM;
[2808] ) TYPE=MyISAM;
[2817] ) TYPE=MyISAM;
[2826] ) TYPE=MyISAM;
[2882] ) TYPE=MyISAM;
[2891] ) TYPE=MyISAM;
[2898] ) TYPE=MyISAM;
[2908] ) TYPE=MyISAM;
[2920] ) TYPE=MyISAM;
[2927] ) TYPE=MyISAM;
[2933] ) TYPE=HEAP;
[2940] ) TYPE=MyISAM;
[2949] ) TYPE=MyISAM;
[2957] ) TYPE=MyISAM;
[2970] ) TYPE=MyISAM;
[2986] ) TYPE=MyISAM;
[2994] ) TYPE=MyISAM;
[3002] ) TYPE=MyISAM;
[3012] ) TYPE=MyISAM;
[3019] ) TYPE=MyISAM;
[3031] ) TYPE=MyISAM;
[3049] ) TYPE=MyISAM;
[3093] ) TYPE=MyISAM;
[3113] ) TYPE=MyISAM;
[3161] ) TYPE=MyISAM;
[3179] ) TYPE=MyISAM;
[3192] ) TYPE=MyISAM;
[3206] ) TYPE=MyISAM;
[3221] ) TYPE=MyISAM;
[3244] ) TYPE=MyISAM;
[3254] ) TYPE=MyISAM;
[3269] ) TYPE=MyISAM;
[3278] ) TYPE=MyISAM;
[3311] ) TYPE=MyISAM;
[3321] ) TYPE=MyISAM;
[3330] ) TYPE=MyISAM;
[3350] ) TYPE=MyISAM;
[3360] ) TYPE=MyISAM;
[3372] ) TYPE=MyISAM;
[3384] ) TYPE=MyISAM;
[3403] ) TYPE=MyISAM;
[3413] ) TYPE=MyISAM;
[3429] ) TYPE=MyISAM;
[3446] ) TYPE=MyISAM;
[3455] ) TYPE=MyISAM;
[3470] ) TYPE=MyISAM;
[3505] ) TYPE=MyISAM;
[3535] ) TYPE=MyISAM;
[3548] ) TYPE=MyISAM;
[3560] ) TYPE=MyISAM;
[3572] ) TYPE=MyISAM;
[3586] ) TYPE=MyISAM;
[3599] ) TYPE=MyISAM;
[3608] ) TYPE=MyISAM;
[3629] ) TYPE=MyISAM;
[3662] ) TYPE=MyISAM;
[3671] ) TYPE=MyISAM;
[3678] ) TYPE=MyISAM;
[3690] ) TYPE=MyISAM;
[3703] ) TYPE=MyISAM;
[3727] ) TYPE=MyISAM;
[3736] ) TYPE=MyISAM;
[3748] ) TYPE=MyISAM;
[3762] ) TYPE=MyISAM;
[3779] ) TYPE=MyISAM;
[3788] ) TYPE=MyISAM;
[3799] ) TYPE=MyISAM;
[3806] ) TYPE=MyISAM;
[3821] ) TYPE=MyISAM;
[3832] ) TYPE=MyISAM;
[3841] ) TYPE=MyISAM;
[3850] ) TYPE=MyISAM;
[3893] ) TYPE=MyISAM;
[3900] ) TYPE=MyISAM;
[3917] ) TYPE=MyISAM;
[3949] ) TYPE=MyISAM;
[3960] ) TYPE=MyISAM;
[3976] ) TYPE=MyISAM;
[3986] ) TYPE=MyISAM;
[4000] ) TYPE=MyISAM;
[4026] ) TYPE=MyISAM;
[4043] ) TYPE=MyISAM;
[4059] ) TYPE=MyISAM;
[4071] ) TYPE=MyISAM;
[4091] ) TYPE=MyISAM;

install\include\install_function.php
[468] ($dbver > '4.1' ? " ENGINE=$type DEFAULT CHARSET=".DBCHARSET : " TYPE=$type");

source\admincp\admincp_db.php
[1008] (DB::$db->version() > '4.1' ? " ENGINE=$type DEFAULT CHARSET=$dbcharset" : " TYPE=$type");
[1049] return preg_replace(array('/TYPE=HEAP/i', '/TYPE=(\w+)/is'), array("ENGINE=MEMORY DEFAULT CHARSET=$dbcharset", "ENGINE=\\1 DEFAULT CHARSET=$dbcharset"), $sql);
[1052] return preg_replace(array('/character set \w+/i', '/collate \w+/i', '/ENGINE=MEMORY/i', '/\s*DEFAULT CHARSET=\w+/is', '/\s*COLLATE=\w+/is', '/ENGINE=(\w+)(.*)/is'), array('', '', 'ENGINE=HEAP', '', '', 'TYPE=\\1\\2'), $sql);
[1094] $tabledump = str_replace('TYPE=MEMORY', 'TYPE=HEAP', $tabledump);

source\class\table\table_common_remote_port.php
[51] $porttable = preg_replace("/^\s*(CREATE TABLE\s+.+\s+\(.+?\)).*$/isU", "\\1", $porttable).($dbver > '4.1' ? " ENGINE=$type DEFAULT CHARSET=".$dbcharset : " TYPE=$type");

source\class\table\table_forum_optionvalue.php
[32] $create_table_sql = "CREATE TABLE ".DB::table($this->_table)." ($fields) TYPE=MyISAM;";
[99] return preg_replace(array('/TYPE=HEAP/i', '/TYPE=(\w+)/is'), array("ENGINE=MEMORY DEFAULT CHARSET=$dbcharset", "ENGINE=\\1 DEFAULT CHARSET=$dbcharset"), $sql);
[102] return preg_replace(array('/character set \w+/i', '/collate \w+/i', '/ENGINE=MEMORY/i', '/\s*DEFAULT CHARSET=\w+/is', '/\s*COLLATE=\w+/is', '/ENGINE=(\w+)(.*)/is'), array('', '', 'ENGINE=HEAP', '', '', 'TYPE=\\1\\2'), $sql);

source\function\function_plugin.php
[247] (DB::$db->version() > '4.1' ? " ENGINE=$type DEFAULT CHARSET=$dbcharset" : " TYPE=$type");
[274] $type = helper_dbtool::dbversion() > '4.1' ? " ENGINE=MEMORY".(empty($config['dbcharset'])?'':" DEFAULT CHARSET=$config[dbcharset]" ): " TYPE=HEAP";
[276] $type = helper_dbtool::dbversion() > '4.1' ? " ENGINE=MYISAM".(empty($config['dbcharset'])?'':" DEFAULT CHARSET=$config[dbcharset]" ): " TYPE=MYISAM";

source\plugin\myrepeats\install.php
[26] ) TYPE=MyISAM;

source\plugin\qqconnect\install.php
[100] ) TYPE=MyISAM;
[116] ) TYPE=MyISAM COMMENT='网盘下载任务表';

source\plugin\qqconnect\upgrade.php
[42] ) TYPE=MyISAM;
[51] ) TYPE=MyISAM;
[67] ) TYPE=MyISAM COMMENT='网盘下载任务表';
     source\plugin\wechat\install\update.func.php
[42] $type = helper_dbtool::dbversion() > '4.1' ? " ENGINE=MEMORY".(empty($config['dbcharset'])?'':" DEFAULT CHARSET=$config[dbcharset]" ): " TYPE=HEAP";
[44] $type = helper_dbtool::dbversion() > '4.1' ? " ENGINE=MYISAM".(empty($config['dbcharset'])?'':" DEFAULT CHARSET=$config[dbcharset]" ): " TYPE=MYISAM";
uc_server\api\dbbak.php
[631] return preg_replace(array('/TYPE=HEAP/i', '/TYPE=(\w+)/is'), array("ENGINE=MEMORY DEFAULT CHARSET=$dbcharset", "ENGINE=\\1 DEFAULT CHARSET=$dbcharset"), $sql);
[634] return preg_replace(array('/character set \w+/i', '/collate \w+/i', '/ENGINE=MEMORY/i', '/\s*DEFAULT CHARSET=\w+/is', '/\s*COLLATE=\w+/is', '/ENGINE=(\w+)(.*)/is'), array('', '', 'ENGINE=HEAP', '', '', 'TYPE=\\1\\2'), $sql);

uc_server\control\admin\db.php
[313] return preg_replace(array('/TYPE=HEAP/i', '/TYPE=(\w+)/is'), array("ENGINE=MEMORY DEFAULT CHARSET=$dbcharset", "ENGINE=\\1 DEFAULT CHARSET=$dbcharset"), $sql);
[316] return preg_replace(array('/character set \w+/i', '/collate \w+/i', '/ENGINE=MEMORY/i', '/\s*DEFAULT CHARSET=\w+/is', '/\s*COLLATE=\w+/is', '/ENGINE=(\w+)(.*)/is'), array('', '', 'ENGINE=HEAP', '', '', 'TYPE=\\1\\2'), $sql);

uc_server\install\func.inc.php
[419] (mysql_get_server_info() > '4.1' ? " ENGINE=$type DEFAULT CHARSET=".DBCHARSET : " TYPE=$type");

uc_server\install\uc.sql
[19] ) TYPE=MyISAM;
[38] ) TYPE=MyISAM;
[45] ) TYPE=MyISAM;
[51] ) TYPE=MyISAM;
[64] ) TYPE=MyISAM;
[73] ) TYPE=MyISAM;
[251] ) TYPE=MyISAM;
[265] ) TYPE=MyISAM;
[281] ) TYPE=MyISAM;
[289] ) TYPE=MyISAM;
[302] ) TYPE=MyISAM;
[315] ) TYPE=MyISAM;
[328] ) TYPE=MyISAM;
[341] ) TYPE=MyISAM;
[354] ) TYPE=MyISAM;
[367] ) TYPE=MyISAM;
[380] ) TYPE=MyISAM;
[393] ) TYPE=MyISAM;
[406] ) TYPE=MyISAM;
[419] ) TYPE=MyISAM;